SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Slimme Joomla! Templating
Tips en Truuks
Robin Poort (@rhcpoort)
JD13NL, Zeist, april 2013
Tweepixels.nl/Academy
trainer | Joomla!
ThemePartner.com
design / development
Templates
index.php
Module alternatieve weergave
Menu item alternatieve weergave
Onveilig
Index.php
Pageclass als body class
<?php
$app = JFactory::getApplication();
$menu = $app->getMenu();
$active = $menu->getActive();
$pageclass = '';
if(is_object($active)
&& isset($active->params)
&& $active->params instanceof JRegistry) {
$pageclass = $active->params->get('pageclass_sfx', '');
}
?>
<body class="<?php echo !empty($pageclass) ? $pageclass : ''; ?>">
...
</body>
body.home {
font-size: 120%;
}
div.left-column {
width: 20%;
}
body.home div.left-column {
width: 40%;
}
<field name="templateStyle"
type="list"
default="style1"
label="Template Style"
description="Kies een stijl voor je template">
<option value="style1">Style1</option>
<option value="style2">Style2</option>
</field>
<?php
$params = JFactory::getApplication()->getTemplate(true)->params;
?>
<body class="<?php echo $params->get('templateStyle'); ?>">
body.style1 { ... }
body.style2 h3 { ... }
<body class="mediumFont highlightFirstWords">
...
</body>
body.smallFont {
font-size: .875em;
}
body.mediumFont {
font-size: 1em;
}
body.largeFont {
font-size: 1.25em;
}
$('body.highlightFirstWords h3').each(function() {
...
});
body {
z-index: 0;
}
@media (min-width:600px) {
body {
z-index: 1;
}
}
if ($('body').css('z-index') == '0') {
...
}
if ($('body').css('z-index') == '1') {
...
}
Alternatieve
weergaven
Modules
Componenten Categorieën
M
enu
item
s
Multi
level
Meer info: http://docs.joomla.org/Layout_Overrides_in_Joomla_2.5
Joomla! installation
components
com_content
views
article
tmpl
default.php
Joomla! installation
templates
[Your template]
html
com_content
article
default.php
views
tmpl
Module Alternatieve Weergave
Website name
Home Item1 Item2 Item3 Contact
Proin sit amet justo interdum
nulla commodo dignissim.
Proin consequat neque vestibulum odio tristique sollicitudin. Ut
molestie ligula ipsum. Suspendisse feugiat quam ut elit mattis
laoreet. Praesent non mi tortor, cursus egestas odio. Aliquam
leo tellus, tincidunt vel pulvinar ac, facilisis eget odio.
Readmore
Joomla! installation
modules
mod_articles_category
tmpl
default.php
Joomla! installation
templates
[Your template]
html
mod_articles_category
default.php
Joomla! installation
templates
[Your template]
html
mod_articles_category
articleslider.php
<?php
$doc =& JFactory::getDocument();
$doc->addScript('...');
$doc->addStylesheet('...');
?>
<div class="articleslider">
...
<?php foreach ($list as [list or group]) : ?>
<li class="slider-item">
...
<p>
<?php $images = json_decode($item->images); ?>
<img src="<?php echo htmlspecialchars($images->image_intro); ?>">
</p>
...
</li>
<?php endforeach; ?>
...
</div>
Website name
Home Item1 Item2 Item3 Contact
Proin sit amet justo interdum
nulla commodo dignissim.
Proin consequat neque vestibulum odio tristique sollicitudin. Ut
molestie ligula ipsum. Suspendisse feugiat quam ut elit mattis
laoreet. Praesent non mi tortor, cursus egestas odio. Aliquam
leo tellus, tincidunt vel pulvinar ac, facilisis eget odio.
Readmore
Menu Item Alternatieve Weergave
dl.contact-address dt {
display: none;
}
dl.contact-address dd {
margin-left: 0;
}
.contact-form legend {
font-size: 1em;
margin-bottom: 0;
}
.contact-form fieldset .control-group:nth-child(6) {
display: none;
}
#jform_contact_message {
width:60%;
height:150px;
}
Joomla! installation
components
com_contact
views
contact
tmpl
default.php
Joomla! installation
templates
[Your template]
html
com_contact
userfriendly.php
contact
Joomla! installation
components
com_contact
views
contact
tmpl
default.xml
Joomla! installation
templates
[Your template]
html
com_contact
userfriendly.xml
contact
<layout title="COM_CONTACT_CONTACT_VIEW_DEFAULT_TITLE"
option="COM_CONTACT_CONTACT_VIEW_DEFAULT_OPTION">
<help key = "JHELP_MENUS_MENU_ITEM_CONTACT_SINGLE_CONTACT" />
<message>
<![CDATA[COM_CONTACT_CONTACT_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<layout title="User Friendly Contact Form"
option="COM_CONTACT_CONTACT_VIEW_DEFAULT_OPTION">
<help key = "JHELP_MENUS_MENU_ITEM_CONTACT_SINGLE_CONTACT" />
<message>
Create a user friendly contact form
</message>
</layout>
...
<div class="span4">
<div class="well">
[contact info area] ...
</div>
<div class="well">
<p>You can use this form in case you:</p>
...
</div>
</div>
<div class="span8">
[contact form area] ...
<h3>Privacy policy</h3>
...
</div>
...
Joomla! installation
components
com_contact
views
contact
tmpl
default_address.php
Joomla! installation
templates
[Your template]
html
com_contact
userfriendly_address.php
contact
Joomla! installation
components
com_contact
views
contact
tmpl
default_form.php
Joomla! installation
templates
[Your template]
html
com_contact
userfriendly_form.php
contact
Vragen?
Ga eens met overrides spelen en oefenen
Probeer meer uit de core te halen
Laat de core met rust! (geen core-hacks)
Laat extensies niet altijd links liggen
Gebruik in je volgende website eens
maximaal 2 frontend extensies
@rhcpoort | @theme_partner | @tweepixels
www.themepartner.com | www.tweepixels.nl/academy
Time's up
Copyright image on first slide:
http://upload.wikimedia.org/wikipedia/commons/3/32/Terry_Evanswood.jpg

Weitere ähnliche Inhalte

Was ist angesagt?

Gravity Forms Hooks & Filters
Gravity Forms Hooks & FiltersGravity Forms Hooks & Filters
Gravity Forms Hooks & Filters
iamdangavin
 
https://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=tshttps://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=ts
Arif Alexi
 
Pourquoi WordPress n’est pas un CMS
Pourquoi WordPress n’est pas un CMSPourquoi WordPress n’est pas un CMS
Pourquoi WordPress n’est pas un CMS
Thomas Gasc
 
Action View Form Helpers - 1, Season 2
Action View Form Helpers - 1, Season 2Action View Form Helpers - 1, Season 2
Action View Form Helpers - 1, Season 2
RORLAB
 

Was ist angesagt? (20)

Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5
 
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018
 
Curso Symfony - Clase 3
Curso Symfony - Clase 3Curso Symfony - Clase 3
Curso Symfony - Clase 3
 
Owasp & php
Owasp & phpOwasp & php
Owasp & php
 
Engines: Team Development on Rails (2005)
Engines: Team Development on Rails (2005)Engines: Team Development on Rails (2005)
Engines: Team Development on Rails (2005)
 
Php if
Php ifPhp if
Php if
 
Understanding form helpers
Understanding form helpersUnderstanding form helpers
Understanding form helpers
 
Gravity Forms Hooks & Filters
Gravity Forms Hooks & FiltersGravity Forms Hooks & Filters
Gravity Forms Hooks & Filters
 
Security in laravel
Security in laravelSecurity in laravel
Security in laravel
 
fb-researchの舞台裏No.2~技術編~(HatchUp主催 渋谷Facebookアプリ勉強会)
fb-researchの舞台裏No.2~技術編~(HatchUp主催 渋谷Facebookアプリ勉強会)fb-researchの舞台裏No.2~技術編~(HatchUp主催 渋谷Facebookアプリ勉強会)
fb-researchの舞台裏No.2~技術編~(HatchUp主催 渋谷Facebookアプリ勉強会)
 
Django の認証処理実装パターン / Django Authentication Patterns
Django の認証処理実装パターン / Django Authentication PatternsDjango の認証処理実装パターン / Django Authentication Patterns
Django の認証処理実装パターン / Django Authentication Patterns
 
WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes
 
https://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=tshttps://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=ts
 
Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2
 
Send.php
Send.phpSend.php
Send.php
 
7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
 
Pourquoi WordPress n’est pas un CMS
Pourquoi WordPress n’est pas un CMSPourquoi WordPress n’est pas un CMS
Pourquoi WordPress n’est pas un CMS
 
Drupal8 simplepage v2
Drupal8 simplepage v2Drupal8 simplepage v2
Drupal8 simplepage v2
 
Action View Form Helpers - 1, Season 2
Action View Form Helpers - 1, Season 2Action View Form Helpers - 1, Season 2
Action View Form Helpers - 1, Season 2
 

Andere mochten auch

Joomla! SEO (with Super Mario) [Dutch]
Joomla! SEO (with Super Mario) [Dutch]Joomla! SEO (with Super Mario) [Dutch]
Joomla! SEO (with Super Mario) [Dutch]
ThemePartner
 
Stop Building Links, Start Earning Them
Stop Building Links, Start Earning ThemStop Building Links, Start Earning Them
Stop Building Links, Start Earning Them
ThemePartner
 

Andere mochten auch (6)

Joomla! SEO (with Super Mario) [Dutch]
Joomla! SEO (with Super Mario) [Dutch]Joomla! SEO (with Super Mario) [Dutch]
Joomla! SEO (with Super Mario) [Dutch]
 
Van voor, naar achter, van links naar... Likes?
Van voor, naar achter, van links naar... Likes?Van voor, naar achter, van links naar... Likes?
Van voor, naar achter, van links naar... Likes?
 
Is Joomla nog steeds de juiste keuze in 2017?
Is Joomla nog steeds de juiste keuze in 2017?Is Joomla nog steeds de juiste keuze in 2017?
Is Joomla nog steeds de juiste keuze in 2017?
 
Creating User Friendly Joomla! Websites and Forms [English]
Creating User Friendly Joomla! Websites and Forms [English]Creating User Friendly Joomla! Websites and Forms [English]
Creating User Friendly Joomla! Websites and Forms [English]
 
Stop Building Links, Start Earning Them
Stop Building Links, Start Earning ThemStop Building Links, Start Earning Them
Stop Building Links, Start Earning Them
 
Responsive Design: Uitdagingen en Oplossingen
Responsive Design: Uitdagingen en OplossingenResponsive Design: Uitdagingen en Oplossingen
Responsive Design: Uitdagingen en Oplossingen
 

Ähnlich wie Slimme Joomla! Templating Tips en Truuks

Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
Anthony Montalbano
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
James Pearce
 
Kohana bootstrap - modal form
Kohana   bootstrap - modal formKohana   bootstrap - modal form
Kohana bootstrap - modal form
Julio Pari
 
Kohana bootstrap - modal form
Kohana   bootstrap - modal formKohana   bootstrap - modal form
Kohana bootstrap - modal form
Julio Pari
 

Ähnlich wie Slimme Joomla! Templating Tips en Truuks (20)

Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
 
07 Php Mysql Update Delete
07 Php Mysql Update Delete07 Php Mysql Update Delete
07 Php Mysql Update Delete
 
Django Vs Rails
Django Vs RailsDjango Vs Rails
Django Vs Rails
 
JS-05-Handlebars.ppt
JS-05-Handlebars.pptJS-05-Handlebars.ppt
JS-05-Handlebars.ppt
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
 
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp OrlandoYou're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp Orlando
 
Grok Drupal (7) Theming
Grok Drupal (7) ThemingGrok Drupal (7) Theming
Grok Drupal (7) Theming
 
Ditching JQuery
Ditching JQueryDitching JQuery
Ditching JQuery
 
The Rails Way
The Rails WayThe Rails Way
The Rails Way
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Jquery tutorial
Jquery tutorialJquery tutorial
Jquery tutorial
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
 
Fcr 2
Fcr 2Fcr 2
Fcr 2
 
Ajax nested form and ajax upload in rails
Ajax nested form and ajax upload in railsAjax nested form and ajax upload in rails
Ajax nested form and ajax upload in rails
 
WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3
 
Kohana bootstrap - modal form
Kohana   bootstrap - modal formKohana   bootstrap - modal form
Kohana bootstrap - modal form
 
Kohana bootstrap - modal form
Kohana   bootstrap - modal formKohana   bootstrap - modal form
Kohana bootstrap - modal form
 
How to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento ExtensionHow to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento Extension
 

Mehr von ThemePartner

Joomla 2.5 SEO [Dutch]
Joomla 2.5 SEO [Dutch]Joomla 2.5 SEO [Dutch]
Joomla 2.5 SEO [Dutch]
ThemePartner
 

Mehr von ThemePartner (8)

Creating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
Creating User Friendly Joomla! Websites and Forms | Joomla! Day DeutschlandCreating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
Creating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
 
Learn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandLearn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day Deutschland
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
 
Joomla! SEO (With Super Mario) [English]
Joomla! SEO (With Super Mario) [English]Joomla! SEO (With Super Mario) [English]
Joomla! SEO (With Super Mario) [English]
 
6 Psychological Techniques to Improve Your Conversion Rate [English]
6 Psychological Techniques to Improve Your Conversion Rate [English]6 Psychological Techniques to Improve Your Conversion Rate [English]
6 Psychological Techniques to Improve Your Conversion Rate [English]
 
Gebruiksvriendelijke sites maken (dutch)
Gebruiksvriendelijke sites maken (dutch)Gebruiksvriendelijke sites maken (dutch)
Gebruiksvriendelijke sites maken (dutch)
 
CSS3 (dutch)
CSS3 (dutch)CSS3 (dutch)
CSS3 (dutch)
 
Joomla 2.5 SEO [Dutch]
Joomla 2.5 SEO [Dutch]Joomla 2.5 SEO [Dutch]
Joomla 2.5 SEO [Dutch]
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Slimme Joomla! Templating Tips en Truuks

Hinweis der Redaktion

  1. Vertellen wie ik ben en wat ik doe
  2. Wat kan je allemaal met templates? Truuks voor in index.php. En alternatieve weergaven
  3. In de template gebeurd alles qua vormgeving en ook een stukje techniek. Tegenwoordig kan je heel erg veel! Vandaag leren dat ook dingen waarvan je het niet verwacht. Simpel gezegd, je hoeft niet altijd meteen naar de &quot;JED&quot; te rennen.
  4. Waarom? Een stukje gemak. Sommigen weten niet beter, daar ga ik vandaag verandering in brengen! En waarom zou ik dat doen? Nou 1 van de redenen dat je minder extensies zou moeten gebruiken is om het volgende:
  5. Kan onveilig zijn. TMP map. Xmap bug + kan ook zonder extensie. Vaak zijn extensies te groot. Te veel opties terwijl je maar 1 keer de extensie nodig hebt.
  6. Zonder index.php geen template. Wat kan je er mee? Ik zal een aantal handige om eenvoudiger te stylen.
  7. Column breder homepage. Fonts groter. Kleuren anders. Andere vormgeving. Op sommige pagina&apos;s. Hoe werkt dat? Je hebt je menu-items, in advanced staat onder page display de page class optie. Vul die in en je bent klaar! Alleen ben je er dan nog niet. Joomla! laat hem zien in het component (op verschillende plekken). Maar het zou handig zijn als ie op de body zat. Doe het volgende..
  8. In je index.php zet je bovenstaande code bovenaan boven de &lt;html&gt; Vervolgens zet je dat onderstaande stukje in je body
  9. Vervolgens kun je dit in je css zetten. Even uitleggen...
  10. Dat was voor 1 website op 1 domein. Wat je ook kunt doen is dezelfde template voor 2 websites gebruiken. Bijvoorbeeld 4 webshops die je hebt. Allemaal in dezelfde layout met dezelfde code maar dan met een andere kleur. Als je dan ook dezelfde index.php gebruikt dan is het handig om een optie te maken in de backend (zo gedaan) om vervolgens een class aan iedere pagina te hangen.
  11. De code is als volgt...
  12. Meer classes. Ook JS aanspreken. Responsive? JS via Media Queries.
  13. Uitleg... Ok so much for the index.php. Nu het echte werk en hoppa naar alternatieve weergaven
  14. Alternatieve weergaven zijn overrides maar dan anders. Je hebt alternatieve weergaven in de volgende categorieen:
  15. Gebruiken kan in begin verwarrend overkomen. Soms wel beschikbaar anders niet. Soms worden wwergaven wat anders op een andere plek. Eerst gewone overrides bespreken.
  16. Dit is je structuur. Je hebt je installatie met de volgende mappen er in
  17. Zo kun je een override maken. Mappen views en tmpl kun je weglaten. Joomla gebruikt nu de bestanden die in je template map staan.
  18. We beginnen maar even makkelijk! Met de module alternative weergave.
  19. Stel je voor: Je wil het volgende gaan maken... Het is een slider waarin wat info staat en een afbeelding met nog een titel en een readmore. Wat gaan we dan doen?
  20. Vandaag met module. Titel + tekst + readmore + intro-image. Pakken we newsflash of bijv. articles category &gt; meer opties
  21. We beginnen met het opzoeken van het bestand wat we nodig hebben. In je installatie naar modules category en dan tmpl en je bestand pakken. Deze kopieren.
  22. HTML map aanmaken.
  23. Alternatieve weergave? Geef hem een andere naam
  24. Scripts + stylesheets toevoegen aan alleen die pagina&apos;s. Bijv. flexslider voor animaten.
  25. HTML moet JS snappen dus classes. Nog geen intro images in modules. Dus zelf ophalen want wel beschikbaar. Op de puntjes staat meer code.
  26. Kies voor een category of featured en hoeveel je er wil tonen
  27. En kies vervolgens bij Advanced options je nieuwe layout &quot;articleslider&quot;.
  28. Stel je voor: Je wil het volgende gaan maken... Het is een slider waarin wat info staat en een afbeelding met nog een titel en een readmore. Wat gaan we dan doen?
  29. Iets moeilijker. Eigenlijk nieuwe menu items. Contactformulier gebruikersvriendelijk. Aanmaken in Joomla en kijken.
  30. Formulier niet zichtbaar en best lelijke opmaak. Niet opgeven en instellingen aanpassen.
  31. Beter maar niet goed. Legend te groot. Message veld klein. Adresgegevens raar ingesprongen. Wat doen we?
  32. Naar de JED! RSForms. Chronoforms. Contactform. Veel functionaliteit. Veel scripts e.d.. Dit allemaal nodig?
  33. Css. verbergen, groter maken, margins etc.
  34. Al beter. Adresgegevens naast formulier. Privacy policy en intro is makkelijk.
  35. Zoek het bestand op
  36. Kopieer en vernoem. Geen underscores.
  37. Maar ook xml pakken voor menu item.
  38. Kopieer en vernoem.
  39. Even alleen titel aanpassen. Uiteraard in taalbestanden. Meer aanpassen? Geen probleem, niet voor presentatie.
  40. Verander menu item type in bestaand contact. Daar staat ie.
  41. De .php aanpassen. Bootstrap (protostar) classes toevoegen. Op puntjes staat weer meer code.Naast elkaar met span. Contact in mooie well. Info er onder en privacy policy.
  42. Adres tel + fax indicatie. All fields required. Labels links.Meer bestanden kopieeren uit de bron map. Niet gekopieerd? dan gebruikt joomla de standaard.
  43. Wel underscores net als origineel
  44. Zelfde prefix underscore
  45. Wel underscores net als origineel
  46. Zelfde prefix underscore
  47. Uiteindelijk zou dit bijvoorbeeld je contact form kunnen zijn
  48. En dat is toch al een stuk beter dan deze dahct ik zo!
  49. ...