17
1.4.2019 Overrides so weit das Auge reicht localhost:8001/?print-pdf#/ 1/17 Created by / OVERRIDES SO WEIT OVERRIDES SO WEIT DAS AUGE REICHT DAS AUGE REICHT Viviana Menzel @drmenzelit

D AS AUG E R E IC H T O V E R R ID E S S O W E IT · 1.4.2019 Overrides so weit das Auge reicht localhost:8001/?print-pdf#/ 1/ 17 Created by / O V E R R ID E S S O W E IT D AS AUG

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 1/17

Created by /

OVERRIDES SO WEITOVERRIDES SO WEITDAS AUGE REICHTDAS AUGE REICHT

Viviana Menzel @drmenzelit

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 2/17

1999 - Websites erstellen mitDreamweaver2002 - Promotion in Biologie (JLU -Gießen)2006 - Joomla! entdeckt2008 - Selbständigkeit – Dr. Menzel IT2014 - J and Beyond, Königstein2015 - j!over

ÜBER MICHÜBER MICH

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 3/17

Joomla arbeitet mit sogenannten "Views"Overrides sind Kopien der Views im eigenenTemplate

WAS SIND OVERRIDES?WAS SIND OVERRIDES?

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 4/17

Übers Backend: Templates -> Templates -> TemplateFiles -> Override anlegenView kopieren:meintemplate/html/com_content/articles/default.php

OVERRIDES ANLEGENOVERRIDES ANLEGEN

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 5/17

Ein Override gilt für alle (default.php)Alternative Layouts kann man individuellzuweisenSpezialfall mit Menüeintragstyp

OVERRIDES UND ALTERNATIVE LAYOUTSOVERRIDES UND ALTERNATIVE LAYOUTS

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 6/17

KomponentenModuleLayoutsTeilweisePluginsSprachstrings

WAS KANN MAN OVERRIDEN?WAS KANN MAN OVERRIDEN?

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 7/17

mod_articles_categories

KATEGORIENLISTEKATEGORIENLISTE

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 8/17

com_content/category

ACCORDION - BLOGACCORDION - BLOG

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 9/17

tipp.php = blog.php

ACCORDION - BLOGACCORDION - BLOG

<?php /** * @package Joomla.Site * @subpackage com_content * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::addIncludePath(JPATH_COMPONENT . '/helpers'); JHtml::_('behavior.caption'); $dispatcher = JEventDispatcher::getInstance(); $this->category->text = $this->category->description; $dispatcher->trigger('onContentPrepare', array($this->category->extension . '.categories', &$this->c$this->category->description = $this->category->text; $results = $dispatcher->trigger('onContentAfterTitle', array($this->category->extension . '.categori$afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array($this->category->extension . '.categ$b f Di l C t t t i (i l d ("\ " $ lt ))

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 10/17

tipp_item.php = blog_item.php

ACCORDION - BLOGACCORDION - BLOG

<?php /** * @package Joomla.Site * @subpackage com_content * * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Create a shortcut for params. $params = $this->item->params; JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); $canEdit = $this->item->params->get('access-edit'); $info = $params->get('info_block_position', 0); // Check if associations are implemented. If they are, define the parameter. $assocParam = (JLanguageAssociations::isEnabled() && $params->get('show_associations')); ?> <?php if ($this->item->state == 0 || strtotime($this->item->publish_up) > strtotime(JFactory::getDat || ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item-><div class="system-unpublished"> <?php endif; ?>

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 11/17

mod_articles_???

SLIDESHOW - MODULSLIDESHOW - MODUL

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 12/17

SLIDESHOW - MODULSLIDESHOW - MODUL<?php /** * @package Joomla.Site * @subpackage mod_articles_news * * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $count = count($list); ?> <div id="slider" class="carousel slide" data-ride="carousel"> <ol class="carousel-indicators"> <?php for ($i = 0; $i < $count; $i++) : ?> <li data-target="#slider" data-slide-to="<?php echo $i; ?>" class="<?php echo $i == <?php endfor; ?> </ol> <div class="carousel-inner"> <?php for ($i = 0; $i < $count; $i++) : ?> <?php $images = json_decode($list[$i]->images); ?> <div class="item carousel-item <?php echo $i == 0 ? 'active' : ''; ?>"> <img class="d-block w-100" src="<?php echo htmlspecialchars($images- <div class="carousel-caption d-block">

<di l " l t t">

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 13/17

SPRACHOVERRIDESSPRACHOVERRIDES

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 14/17

com_content/category

KATEGORIELISTEKATEGORIELISTE

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 15/17

LEKTÜRELEKTÜREWie Sie mit Overrides die Ausgabe von Joomlabeeinflussen könnenJoomla-Overrides und Custom Fields – ein DreamteamJoomla! – Muss immer eine Joomla-Erweiterung sein?

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 16/17

VIEL SPASS BEIM NACHBAUEN!VIEL SPASS BEIM NACHBAUEN!

1.4.2019 Overrides so weit das Auge reicht

localhost:8001/?print-pdf#/ 17/17

Die deutsche Joomla! Konferenz Fachvorträge und Netzwerken

13.09. - 14.09.2019

www.joomladay.de