SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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.
 

Destacado (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.
 

Similar a 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
 

Similar a 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
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Último (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

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

Notas del editor

  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.