Joomla! Programmierung/Framework/JHtml/iframe

Aus Joomla! Dokumentation
Wechseln zu: Navigation, Suche

Gibt ein <iframe></iframe> Element aus.

Inhaltsverzeichnis

[Bearbeiten] Syntax

static string iframe( $url, $name, $attribs, $noFrames )

Parameter Datentyp Beschreibung Standardwert
$url string Die URL, auf die per <iframe /> eingebunden werden soll.
$name string Das "name" Attribut des <iframe />.
$attribs array() Attribute des <iframe />, müssen als Array in der Form array('name' => 'wert') übergeben werden. null
$noFrames string Der Text, der angezeigt werden soll, falls der Browser keine iframes unterstützt. ''

[Bearbeiten] Beispiele

[Bearbeiten] IFrame erstellen

$url = 'http://www.joomla.org';
$name = 'joomla';
$attribs['width'] = '500px';
$attribs['height'] = '300px';
$attribs['scrolling'] = 'no';
$noFrames = 'Joomla!.org in einem iframe';
 
echo JHtml::_('iframe', $url, $name, $attribs, $noFrames);

Ausgabe:

<iframe src="http://www.joomla.org" width="500px" height="300px" scrolling="no" name="joomla">Joomla!.org in einem iframe</iframe>

[Bearbeiten] Siehe auch

[Bearbeiten] Quellcode

JHtml::iframe in Joomla! 2.5.4

Folder blue.png libraries

  • Folder red.png joomla
    • Folder green.png html
      • File php.png html.php
  1. public static function iframe($url, $name, $attribs = null, $noFrames = '')
  2. {
  3. if (is_array($attribs))
  4. {
  5. $attribs = JArrayHelper::toString($attribs);
  6. }
  7.  
  8. return '<iframe src="' . $url . '" ' . $attribs . ' name="' . $name . '">' . $noFrames . '</iframe>';
  9. }
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Sonstiges
Team Navigation
Werkzeuge