Benutzer-Werkzeuge

Webseiten-Werkzeuge


joomla:jinput

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
joomla:jinput [15/02/2021 16:22] – Externe Bearbeitung 127.0.0.1joomla:jinput [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1
Zeile 1: Zeile 1:
-====== Joomla - Modalbox ====== 
- 
-Wie stelle ich es an, dass gewisse Inhalte einer Komponente in einer Modalbox angezeigt werden? 
- 
-===== Inhalt der Modalbox ===== 
- 
-Der Inhalt der Modalbox kann zum Beispiel mit einer eigenen Komponenten-View gefüllt werden.\\  
-Dazu werden folgende Dateien benötigt: 
- 
-views/testview/view.raw.php\\  
-views/testview/tmpl/modalbox.php 
- 
-<file php view.raw.php> 
-<?php 
- 
-// No direct access 
-defined('_JEXEC') or die; 
- 
-use \Joomla\CMS\Factory; 
- 
-/** 
- * View class for modals 
-*/ 
- 
-class ComponentViewTestview extends \Joomla\CMS\MVC\View\HtmlView 
-{ 
- 
-  /** 
-  * Display the view 
-  * 
-  * @param   string  $tpl  Template name 
-  * @return void 
-  * @throws Exception 
-  */ 
-  public function display($tpl = null) 
-  { 
-     $app = Factory::getApplication(); 
- 
-     $this->state = $this->get('State'); 
-     $this->params = $app->getParams('com_component'); 
-  
- 
-     // Check for errors. 
-     if (count($errors = $this->get('Errors'))) 
-     { 
-     throw new Exception(implode("\n", $errors)); 
-     } 
-      
-     $this->_prepareDocument(); 
-     parent::display($tpl); 
-  } 
-} 
-</file> 
- 
-<file php modalbox.php> 
-<?php 
-// No direct access 
-defined('_JEXEC') or die; 
- 
-//URL: index.php?option=com_component&view=testview&format=raw&layout=modalbox 
-?> 
- 
-<p>Inhalt der Modalbox</p> 
-</file> 
-\\  
-\\  
- 
-===== Aufrufen der Modalbox ===== 
- 
-==== Mootols: Modalbox ==== 
- 
-<file php default.php> 
-<?php 
- 
-use \Joomla\CMS\HTML\HTMLHelper; 
-use \Joomla\CMS\Router\Route; 
- 
-HTMLHelper::_('behavior.modal'); 
- 
-. 
-. 
-. 
- 
-<a id ="modalbox1" href="<?php echo Route::_('index.php?option=com_component&view=testview&format=raw&layout=modalbox'); ?>" class="modal">Open Modalbox</a> 
-</file> 
- 
-==== Bootstrap: Modalbox ==== 
-https://getbootstrap.com/docs/4.0/components/modal/ 
- 
-<file php default.php> 
-<?php 
- 
-use \Joomla\CMS\Router\Route; 
- 
-. 
-. 
-. 
- 
-<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#bootstrapModalbox"> 
-  Bootstrap: Modalbox 
-</button> 
- 
-<!-- Modal-Box --> 
-<div class="modal hide fade jviewport-width80 in" id="bootstrapModalbox" tabindex="-1" aria-labelledby="bootstrapModalboxTitle" aria-hidden="true"> 
-  <div class="modal-header"> 
-    <button type="button" class="close novalidate" data-dismiss="modal" aria-label="Close"> 
-      <span aria-hidden="true">&times;</span> 
-    </button> 
-    <h3 id="bootstrapModalboxTitle">Modalbox title</h3> 
-  </div> 
-  <div class="modal-body"> 
-    <iframe class="iframe" src="<?php echo Route::_('index.php?option=com_attlist&view=meldungform&format=raw&layout=modal_success'); ?>" name="iframe name"></iframe> 
-  </div> 
-  <div class="modal-footer"> 
-    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> 
-    <button type="button" class="btn btn-primary">Save changes</button> 
-  </div> 
-</div> 
- 
-</file> 
- 
  
joomla/jinput.1613402526.txt.gz · Zuletzt geändert: 15/02/2021 16:22 von 127.0.0.1