SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Tweaking your
Favorite Template
Barb Ackemann
IrisLines.com
…gettingmorehandlestohangyourstyleson.
Joomla Day Boston 2014
You don’t have to know anything….
(and this is a good thing?)
What about those of us who do
know something?
This workshop is for US!
It’s all about the handles….
•We know how to write CSS styles for
particular selectors.
•Different templates give us different
handles.
•We have to examine what our chosen
template gives us to work with.
It’s all about the handles….
• Beez3: <body id=“shadow”> and <article class=“item-page”>
• Protostar: <body class=“site com_content view-article no-layout no-task
itemid-266”> and <div class=“item-page”>
• OneWeb: <body class=“sub-page com_content view-article itemid-266”>
• Master from YooTheme: <body id=“page” class=“page isblog data-
config=‘{“twitter”:0, “plusone”:0, “facebook”:0}’>
• Master2 from YooTheme: <body class=“tm-isblog”>
Joomla lets us….
• Add a page class suffix when we create a menu item.
But…
• You have to remember to do it.
• You can’t do it with the NoNumber AddtoMenu plugin.
• Your theme might not even use it!
Page Class Suffix “contentx”
• Beez3: <body id=“shadow”> and <article class=“item-page”>
<body id=“shadow”> and <article class=“item-pagecontentx”> or
<body id=“shadow”> and <article class=“item-page contentx”>
• Protostar: <body class=“site com_content view-article no-layout no-task
itemid-266”> and <div class=“item-page”>
<div class=“item-pagecontentx”> or
<div class=“item-page contentx”>
• OneWeb: <body class=“sub-page com_content view-article itemid-266”>
NO USE OF PAGE CLASS SUFFIX AT ALL!
• Master from YooTheme: <body id=“page” class=“page isblog data-
config=‘{“twitter”:0, “plusone”:0, “facebook”:0}’>
<body id=“page” class=“page isblog contentx
data-config=‘{“twitter”:0, “plusone”:0, “facebook”:0}’>
• Master2 from YooTheme: <body class=“tm-isblog”>
<body class=“tm-isblog contentx”>
I have lots styles…. but I want to hang
different styles on different pages.
Joomla lets us….
• Use more than one template.
• Create multiple variations or styles for templates.
• Assign different templates or styles to different pages.
Barb Ackemann
IrisLines.com
Joomla lets us….
• Use more than one template.
• Create multiple variations or styles for templates.
• Assign different templates or styles to different pages.
But…
• You have to remember to make that assignment.
• You can’t make that assignment with the NoNumber
AddtoMenu plugin.
So…
• Let’s add a little magic
code to “crawl up the
menu” and give us a
“handle” based on the
top level of the menu
structure.
• The proverbial
Sky Hook!
Imagine having a class for each
section of your site…
A complicated site structure….
• Use more than one template.
• Create multiple variations or styles for templates.
• Assign different templates or styles to different pages.
..that knows where it came from!
• Use more than one template.
• Create multiple variations or styles for templates.
• Assign different templates or styles to different pages.
Just 4 lines of code….
1. $menu = JFactory::getApplication ()->getMenu();
2. $active = $menu->getActive();
3. $top = $active ? $menu->getItem($active->tree[0]) : null;
4. class=“<?php echo $top->alias; ?>”
It’s all about the handles….
• Beez3: <body id=“shadow” class=“using-joomla”>
• Protostar: <body class=“site com_content view-article no-layout no-task
itemid-266 using-joomla”>
• OneWeb:
<body class=“sub-page com_content view-article itemid-266 using-joomla”>
• Master from YooTheme: <body id=“page” class=“page isblog using-joomla”
data-config=‘{“twitter”:0, “plusone”:0, “facebook”:0}’>
• Master2 from YooTheme: <body class=“tm-isblog using-joomla”>
One other idea….
• Joomla creates a variable $sitehome
• We can harness this if we add this bit of logic in the php block at the
top of our index.php:
$activeMenu = & JSite::getMenu();
if ($activeMenu->getActive() == $activeMenu->getDefault())
{$siteHome = 'home';}else{$siteHome = 'sub';}
• We can now check the value of $siteHome, and when it is =“sub” we
can add in a module position, or hardcoded div to which we can
apply a different background image for each section of the site!
Code in place for library site..
• No modules need to be created or maintained.
• No modules need to be assigned to new pages as they are added to
the site.
• Each section of the site loads a different background image for that
banner area.
In the template index.php file:
<?php if ($siteHome == 'sub') : ?>
<div id="section-banner"> &nbsp;</div>
<?php endif; ?>
In the stylesheet:
.borrow #section-banner { background-image: url(/../images/section-
banners/borrow.jpg); }
.search #section-banner { background-image: url(/../images/section-
banners/reference.jpg); }
Etc.
For More Information
Barb Ackemann
IrisLines.com
barb@irislines.com

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersMelvin John
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointSahil Gandhi
 
WordPress Theme Development: Part 2
WordPress Theme Development: Part 2WordPress Theme Development: Part 2
WordPress Theme Development: Part 2Josh Lee
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Holger Bartel
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to BootstrapRon Reiter
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalChandra Prakash Thapa
 
A beginner's guide to twitter bootstrap
A beginner's guide to twitter bootstrapA beginner's guide to twitter bootstrap
A beginner's guide to twitter bootstrapSunanda Bansal
 
Bootstrap Introduction
Bootstrap IntroductionBootstrap Introduction
Bootstrap IntroductionAndrea Tarr
 
Custom WordPress theme development
Custom WordPress theme developmentCustom WordPress theme development
Custom WordPress theme developmentTammy Hart
 
WooCommerce: Where to Place Customization
WooCommerce: Where to Place CustomizationWooCommerce: Where to Place Customization
WooCommerce: Where to Place CustomizationRodolfo Melogli
 
CSS For Coders
CSS For CodersCSS For Coders
CSS For Codersggfergu
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter BootstrapAhmed Haque
 
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeCreating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeAcquia
 
Introduction to Twitter's Bootstrap 2
Introduction to Twitter's Bootstrap 2Introduction to Twitter's Bootstrap 2
Introduction to Twitter's Bootstrap 2Julien Renaux
 
What's Object-Oriented CSS (japanese)
What's Object-Oriented CSS (japanese)What's Object-Oriented CSS (japanese)
What's Object-Oriented CSS (japanese)shinobu tsutsui
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structurekeithdevon
 

Was ist angesagt? (20)

Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for Developers
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPoint
 
WordPress Theme Development: Part 2
WordPress Theme Development: Part 2WordPress Theme Development: Part 2
WordPress Theme Development: Part 2
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
 
A beginner's guide to twitter bootstrap
A beginner's guide to twitter bootstrapA beginner's guide to twitter bootstrap
A beginner's guide to twitter bootstrap
 
Bootstrap Introduction
Bootstrap IntroductionBootstrap Introduction
Bootstrap Introduction
 
Custom WordPress theme development
Custom WordPress theme developmentCustom WordPress theme development
Custom WordPress theme development
 
WooCommerce: Where to Place Customization
WooCommerce: Where to Place CustomizationWooCommerce: Where to Place Customization
WooCommerce: Where to Place Customization
 
Bootstrap 3 vs. bootstrap 4
Bootstrap 3 vs. bootstrap 4Bootstrap 3 vs. bootstrap 4
Bootstrap 3 vs. bootstrap 4
 
CSS For Coders
CSS For CodersCSS For Coders
CSS For Coders
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter Bootstrap
 
CSS Systems
CSS SystemsCSS Systems
CSS Systems
 
Bootstrap 3.1.1
Bootstrap 3.1.1Bootstrap 3.1.1
Bootstrap 3.1.1
 
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeCreating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
 
Introduction to Twitter's Bootstrap 2
Introduction to Twitter's Bootstrap 2Introduction to Twitter's Bootstrap 2
Introduction to Twitter's Bootstrap 2
 
What's Object-Oriented CSS (japanese)
What's Object-Oriented CSS (japanese)What's Object-Oriented CSS (japanese)
What's Object-Oriented CSS (japanese)
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structure
 

Andere mochten auch

1ความหมายและประเภทของคอมพิวเตอร์
1ความหมายและประเภทของคอมพิวเตอร์1ความหมายและประเภทของคอมพิวเตอร์
1ความหมายและประเภทของคอมพิวเตอร์ฉลาม แดนนาวิน
 
Presentatie joomla3 responsive Protostar template
Presentatie joomla3 responsive Protostar templatePresentatie joomla3 responsive Protostar template
Presentatie joomla3 responsive Protostar templateHan Maassen
 
memasang banner di joomla
memasang banner di joomlamemasang banner di joomla
memasang banner di joomlaTeguh Nugraha
 
Mar 2012-joomla-2.5-and-the-path-ahead
Mar 2012-joomla-2.5-and-the-path-aheadMar 2012-joomla-2.5-and-the-path-ahead
Mar 2012-joomla-2.5-and-the-path-aheadLinda Coonen
 
Joomla Basics Part3
Joomla Basics Part3Joomla Basics Part3
Joomla Basics Part3Linda Coonen
 
Joomla 3.0 Made Easy | Free E-book
Joomla 3.0 Made Easy | Free E-book Joomla 3.0 Made Easy | Free E-book
Joomla 3.0 Made Easy | Free E-book JoomlaShine
 
Configuring & Installing Joomla on Windows using WAMP Server.
Configuring & Installing Joomla on Windows using WAMP Server.Configuring & Installing Joomla on Windows using WAMP Server.
Configuring & Installing Joomla on Windows using WAMP Server.Abhijit B.
 

Andere mochten auch (7)

1ความหมายและประเภทของคอมพิวเตอร์
1ความหมายและประเภทของคอมพิวเตอร์1ความหมายและประเภทของคอมพิวเตอร์
1ความหมายและประเภทของคอมพิวเตอร์
 
Presentatie joomla3 responsive Protostar template
Presentatie joomla3 responsive Protostar templatePresentatie joomla3 responsive Protostar template
Presentatie joomla3 responsive Protostar template
 
memasang banner di joomla
memasang banner di joomlamemasang banner di joomla
memasang banner di joomla
 
Mar 2012-joomla-2.5-and-the-path-ahead
Mar 2012-joomla-2.5-and-the-path-aheadMar 2012-joomla-2.5-and-the-path-ahead
Mar 2012-joomla-2.5-and-the-path-ahead
 
Joomla Basics Part3
Joomla Basics Part3Joomla Basics Part3
Joomla Basics Part3
 
Joomla 3.0 Made Easy | Free E-book
Joomla 3.0 Made Easy | Free E-book Joomla 3.0 Made Easy | Free E-book
Joomla 3.0 Made Easy | Free E-book
 
Configuring & Installing Joomla on Windows using WAMP Server.
Configuring & Installing Joomla on Windows using WAMP Server.Configuring & Installing Joomla on Windows using WAMP Server.
Configuring & Installing Joomla on Windows using WAMP Server.
 

Ähnlich wie Tweaking your Template: Joomla Day Boston 2014 Barb Ackemann

Intro to OOCSS Workshop
Intro to OOCSS WorkshopIntro to OOCSS Workshop
Intro to OOCSS WorkshopJulie Cameron
 
Theming moodle technical
Theming moodle   technicalTheming moodle   technical
Theming moodle technicalAlex Walker
 
Untangling spring week5
Untangling spring week5Untangling spring week5
Untangling spring week5Derek Jacoby
 
OOCSS for Javascript pirates at jQueryPgh meetup
OOCSS for Javascript pirates at jQueryPgh meetupOOCSS for Javascript pirates at jQueryPgh meetup
OOCSS for Javascript pirates at jQueryPgh meetupBrian Cavalier
 
OOCSS for JavaScript Pirates jQcon Boston
OOCSS for JavaScript Pirates jQcon BostonOOCSS for JavaScript Pirates jQcon Boston
OOCSS for JavaScript Pirates jQcon BostonJohn Hann
 
Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temyJuraj Kiss
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4imdurgesh
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress WebsitesKyle Cearley
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designersPai-Cheng Tao
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for websiteOdoo
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1Yoav Farhi
 
Build and save your own Gutenberg Block Patterns
Build and save your own Gutenberg Block PatternsBuild and save your own Gutenberg Block Patterns
Build and save your own Gutenberg Block PatternsPlasterdog Web Design
 
Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!Hans Kuijpers
 
Crash Course in Theme Surgery
Crash Course in Theme SurgeryCrash Course in Theme Surgery
Crash Course in Theme SurgeryRational Frank
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Derek Jacoby
 

Ähnlich wie Tweaking your Template: Joomla Day Boston 2014 Barb Ackemann (20)

Intro to OOCSS Workshop
Intro to OOCSS WorkshopIntro to OOCSS Workshop
Intro to OOCSS Workshop
 
Theming moodle technical
Theming moodle   technicalTheming moodle   technical
Theming moodle technical
 
Untangling spring week5
Untangling spring week5Untangling spring week5
Untangling spring week5
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
 
OOCSS for Javascript pirates at jQueryPgh meetup
OOCSS for Javascript pirates at jQueryPgh meetupOOCSS for Javascript pirates at jQueryPgh meetup
OOCSS for Javascript pirates at jQueryPgh meetup
 
OOCSS for JavaScript Pirates jQcon Boston
OOCSS for JavaScript Pirates jQcon BostonOOCSS for JavaScript Pirates jQcon Boston
OOCSS for JavaScript Pirates jQcon Boston
 
Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temy
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
 
Boot strap
Boot strapBoot strap
Boot strap
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designers
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for website
 
The Thinking behind BEM
The Thinking behind BEMThe Thinking behind BEM
The Thinking behind BEM
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Build and save your own Gutenberg Block Patterns
Build and save your own Gutenberg Block PatternsBuild and save your own Gutenberg Block Patterns
Build and save your own Gutenberg Block Patterns
 
File Upload 2015
File Upload 2015File Upload 2015
File Upload 2015
 
Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!
 
Crash Course in Theme Surgery
Crash Course in Theme SurgeryCrash Course in Theme Surgery
Crash Course in Theme Surgery
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4
 

Kürzlich hochgeladen

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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.pdfsudhanshuwaghmare1
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
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...Orbitshub
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
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 educationjfdjdjcjdnsjd
 
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, ...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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 ...apidays
 
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 AmsterdamUiPathCommunity
 
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 DevelopersWSO2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
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 challengesrafiqahmad00786416
 
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 2024Victor Rentea
 

Kürzlich hochgeladen (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 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 ...
 
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
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
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
 

Tweaking your Template: Joomla Day Boston 2014 Barb Ackemann

  • 1. Tweaking your Favorite Template Barb Ackemann IrisLines.com …gettingmorehandlestohangyourstyleson. Joomla Day Boston 2014
  • 2. You don’t have to know anything…. (and this is a good thing?) What about those of us who do know something? This workshop is for US!
  • 3. It’s all about the handles…. •We know how to write CSS styles for particular selectors. •Different templates give us different handles. •We have to examine what our chosen template gives us to work with.
  • 4.
  • 5. It’s all about the handles…. • Beez3: <body id=“shadow”> and <article class=“item-page”> • Protostar: <body class=“site com_content view-article no-layout no-task itemid-266”> and <div class=“item-page”> • OneWeb: <body class=“sub-page com_content view-article itemid-266”> • Master from YooTheme: <body id=“page” class=“page isblog data- config=‘{“twitter”:0, “plusone”:0, “facebook”:0}’> • Master2 from YooTheme: <body class=“tm-isblog”>
  • 6. Joomla lets us…. • Add a page class suffix when we create a menu item. But… • You have to remember to do it. • You can’t do it with the NoNumber AddtoMenu plugin. • Your theme might not even use it!
  • 7. Page Class Suffix “contentx” • Beez3: <body id=“shadow”> and <article class=“item-page”> <body id=“shadow”> and <article class=“item-pagecontentx”> or <body id=“shadow”> and <article class=“item-page contentx”> • Protostar: <body class=“site com_content view-article no-layout no-task itemid-266”> and <div class=“item-page”> <div class=“item-pagecontentx”> or <div class=“item-page contentx”> • OneWeb: <body class=“sub-page com_content view-article itemid-266”> NO USE OF PAGE CLASS SUFFIX AT ALL! • Master from YooTheme: <body id=“page” class=“page isblog data- config=‘{“twitter”:0, “plusone”:0, “facebook”:0}’> <body id=“page” class=“page isblog contentx data-config=‘{“twitter”:0, “plusone”:0, “facebook”:0}’> • Master2 from YooTheme: <body class=“tm-isblog”> <body class=“tm-isblog contentx”>
  • 8. I have lots styles…. but I want to hang different styles on different pages.
  • 9. Joomla lets us…. • Use more than one template. • Create multiple variations or styles for templates. • Assign different templates or styles to different pages. Barb Ackemann IrisLines.com
  • 10. Joomla lets us…. • Use more than one template. • Create multiple variations or styles for templates. • Assign different templates or styles to different pages. But… • You have to remember to make that assignment. • You can’t make that assignment with the NoNumber AddtoMenu plugin.
  • 11. So… • Let’s add a little magic code to “crawl up the menu” and give us a “handle” based on the top level of the menu structure. • The proverbial Sky Hook!
  • 12. Imagine having a class for each section of your site…
  • 13. A complicated site structure…. • Use more than one template. • Create multiple variations or styles for templates. • Assign different templates or styles to different pages.
  • 14. ..that knows where it came from! • Use more than one template. • Create multiple variations or styles for templates. • Assign different templates or styles to different pages.
  • 15. Just 4 lines of code…. 1. $menu = JFactory::getApplication ()->getMenu(); 2. $active = $menu->getActive(); 3. $top = $active ? $menu->getItem($active->tree[0]) : null; 4. class=“<?php echo $top->alias; ?>”
  • 16.
  • 17. It’s all about the handles…. • Beez3: <body id=“shadow” class=“using-joomla”> • Protostar: <body class=“site com_content view-article no-layout no-task itemid-266 using-joomla”> • OneWeb: <body class=“sub-page com_content view-article itemid-266 using-joomla”> • Master from YooTheme: <body id=“page” class=“page isblog using-joomla” data-config=‘{“twitter”:0, “plusone”:0, “facebook”:0}’> • Master2 from YooTheme: <body class=“tm-isblog using-joomla”>
  • 18.
  • 19. One other idea…. • Joomla creates a variable $sitehome • We can harness this if we add this bit of logic in the php block at the top of our index.php: $activeMenu = & JSite::getMenu(); if ($activeMenu->getActive() == $activeMenu->getDefault()) {$siteHome = 'home';}else{$siteHome = 'sub';} • We can now check the value of $siteHome, and when it is =“sub” we can add in a module position, or hardcoded div to which we can apply a different background image for each section of the site!
  • 20. Code in place for library site.. • No modules need to be created or maintained. • No modules need to be assigned to new pages as they are added to the site. • Each section of the site loads a different background image for that banner area. In the template index.php file: <?php if ($siteHome == 'sub') : ?> <div id="section-banner"> &nbsp;</div> <?php endif; ?> In the stylesheet: .borrow #section-banner { background-image: url(/../images/section- banners/borrow.jpg); } .search #section-banner { background-image: url(/../images/section- banners/reference.jpg); } Etc.
  • 21. For More Information Barb Ackemann IrisLines.com barb@irislines.com

Hinweis der Redaktion

  1. Play the slide show for this presentation to listen to the audio commentary by Peter Walsh and view slide timings. Or, click the sound icon on a slide for controls that you can use to hear the audio at your own pace.A little organization will go a long way to enhancing your PowerPoint presentation. Your title slide should be catching and relevant to your audience – offer something in the title that your audience wants. Keep some basic principles in mind:Your slides should complement what you have to say, not say it for you. Keep slides direct and to the point - less is more!Choose a background color or design that enhances and complements your presentation rather than competes with it. Don’t get too fancy - a simple font, elegant color scheme and clear message is more important than lots of information (clutter!) on the slide.Keep it simple! The purpose of the PowerPoint slide is to keep the mind of your audience focused – fewer words are better. Note: You understand that Microsoft does not endorse or control the content provided in the following presentation.
  2. Have a summary slide of your presentation – state it succinctly in a way that wraps your presentation.Use the ‘Fade in and dim’ animation – this keeps focus on the major summary heading but still allows you to talk about summary points.Three important steps in wrapping your presentation: Thank your audience for taking part in the presentation. Call for questions, making it clear how many questions you’ll take or how long question time will last. Encourage the audience to take what they’ve learned in the presentation and apply it to their situation directly.
  3. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  4. Demo examining the code that different templates produce
  5. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  6. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  7. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  8. Be sure that major headings are always in the same font, size and color – this provides your audience with a visual cue to where they are in the presentation.Organize your thoughts before you start preparing your slides – too much mental clutter is as bad for your presentation as too much clutter on your slides. Use the Animation Schemes to add interest – here the ‘Fade’ entrance animation is used to gradually reveal content.Clarity is what your audience needs here so keep your message clear and focused.Keep your major slides brief – the slides are meant to summarize what you’re saying, not contain all your information.
  9. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  10. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  11. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  12. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  13. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  14. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  15. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  16. Demo adding the code to each template -- Demo viewing page, and viewing code.
  17. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  18. Demo http://www.pca.state.mn.us/Demo http://brookslibraryvt.org/
  19. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  20. Consider sub-headings that provide an emotional or action-oriented aspect to your presentation – these can be very motivating to an audience.
  21. If you’re presenting to an audience, the final slide should include:Your contact information.Publications relevant to your presentation and of interest to the audience.Other relevant information for the audience to follow up if interested.Keep this slide on screen while the audience disperses.