joomla:modalbox
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| joomla:modalbox [30/07/2020 15:00] – Manuel | joomla:modalbox [31/07/2020 11:15] (aktuell) – Manuel | ||
|---|---|---|---|
| Zeile 3: | Zeile 3: | ||
| Wie stelle ich es an, dass gewisse Inhalte einer Komponente in einer Modalbox angezeigt werden? | Wie stelle ich es an, dass gewisse Inhalte einer Komponente in einer Modalbox angezeigt werden? | ||
| - | **Lösung: | + | ===== Inhalt der Modalbox ===== |
| - | __Inhalt der Modalbox__ | + | Der Inhalt der Modalbox kann zum Beispiel mit einer eigenen Komponenten-View gefüllt werden.\\ |
| - | + | ||
| - | Der Inhalt der Modalbox kann zum Beispiel mit einer eigenen Komponenten-View gefüllt werden. | + | |
| Dazu werden folgende Dateien benötigt: | Dazu werden folgende Dateien benötigt: | ||
| - | views/ | + | views/ |
| views/ | views/ | ||
| - | view.raw.php<code> | + | <file php view.raw.php> |
| + | <?php | ||
| // No direct access | // No direct access | ||
| defined(' | defined(' | ||
| Zeile 21: | Zeile 21: | ||
| /** | /** | ||
| * View class for modals | * View class for modals | ||
| - | * | + | */ |
| - | */ | + | |
| class ComponentViewTestview extends \Joomla\CMS\MVC\View\HtmlView | class ComponentViewTestview extends \Joomla\CMS\MVC\View\HtmlView | ||
| + | { | ||
| - | /** | + | |
| - | * Display the view | + | * Display the view |
| - | * | + | * |
| - | * @param | + | * @param |
| - | * @return void | + | * @return void |
| - | * @throws Exception | + | * @throws Exception |
| - | */ | + | */ |
| - | public function display($tpl = null) | + | public function display($tpl = null) |
| { | { | ||
| $app = Factory:: | $app = Factory:: | ||
| Zeile 48: | Zeile 49: | ||
| | | ||
| | | ||
| - | } | ||
| } | } | ||
| - | </code> | + | } |
| + | </file> | ||
| + | <file php modalbox.php> | ||
| + | <?php | ||
| + | // No direct access | ||
| + | defined(' | ||
| - | __Datei, von welcher die Modalbox | + | //URL: index.php? |
| + | ?> | ||
| + | |||
| + | < | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | |||
| + | ===== Aufrufen der Modalbox ===== | ||
| + | |||
| + | ==== Mootols: Modalbox ==== | ||
| + | |||
| + | <file php default.php> | ||
| + | <?php | ||
| - | Zu Beginn der entsprechenden tmpl-datei (z.B views/ | ||
| - | < | ||
| use \Joomla\CMS\HTML\HTMLHelper; | use \Joomla\CMS\HTML\HTMLHelper; | ||
| + | use \Joomla\CMS\Router\Route; | ||
| + | |||
| HTMLHelper:: | HTMLHelper:: | ||
| - | </code> | + | |
| - | Damit wird die Modalbox | + | . |
| + | . | ||
| + | . | ||
| + | |||
| + | <a id =" | ||
| + | </ | ||
| + | |||
| + | ==== Bootstrap: | ||
| + | https:// | ||
| + | |||
| + | <file php default.php> | ||
| + | <?php | ||
| + | |||
| + | use \Joomla\CMS\Router\Route; | ||
| + | |||
| + | . | ||
| + | . | ||
| + | . | ||
| + | |||
| + | <button type=" | ||
| + | Bootstrap: Modalbox | ||
| + | </ | ||
| + | |||
| + | <!-- Modal-Box --> | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <button type=" | ||
| + | <span aria-hidden=" | ||
| + | </ | ||
| + | <h3 id=" | ||
| + | </ | ||
| + | <div class=" | ||
| + | <iframe class=" | ||
| + | </ | ||
| + | <div class=" | ||
| + | <button type=" | ||
| + | <button type=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | </ | ||
joomla/modalbox.1596114006.txt.gz · Zuletzt geändert: 30/07/2020 15:00 von Manuel