SlideShare a Scribd company logo
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

More Related Content

What's hot

Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for Developers
Melvin 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 2
Josh Lee
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda 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 2015
Holger Bartel
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
Ron 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 Nepal
Chandra 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 bootstrap
Sunanda Bansal
 
Bootstrap Introduction
Bootstrap IntroductionBootstrap Introduction
Bootstrap Introduction
Andrea Tarr
 
Custom WordPress theme development
Custom WordPress theme developmentCustom WordPress theme development
Custom WordPress theme development
Tammy Hart
 
WooCommerce: Where to Place Customization
WooCommerce: Where to Place CustomizationWooCommerce: Where to Place Customization
WooCommerce: Where to Place Customization
Rodolfo Melogli
 
Bootstrap 3 vs. bootstrap 4
Bootstrap 3 vs. bootstrap 4Bootstrap 3 vs. bootstrap 4
Bootstrap 3 vs. bootstrap 4
Ahmad Awsaf-uz-zaman
 
CSS For Coders
CSS For CodersCSS For Coders
CSS For Coders
ggfergu
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter Bootstrap
Ahmed Haque
 
CSS Systems
CSS SystemsCSS Systems
CSS Systems
Natalie Downe
 
Bootstrap 3.1.1
Bootstrap 3.1.1Bootstrap 3.1.1
Bootstrap 3.1.1
Prasad Parab
 
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
Acquia
 
Introduction to Twitter's Bootstrap 2
Introduction to Twitter's Bootstrap 2Introduction to Twitter's Bootstrap 2
Introduction to Twitter's Bootstrap 2
Julien 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 Structure
keithdevon
 

What's hot (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
 

Viewers also liked

1ความหมายและประเภทของคอมพิวเตอร์
1ความหมายและประเภทของคอมพิวเตอร์1ความหมายและประเภทของคอมพิวเตอร์
1ความหมายและประเภทของคอมพิวเตอร์
ฉลาม แดนนาวิน
 
Presentatie joomla3 responsive Protostar template
Presentatie joomla3 responsive Protostar templatePresentatie joomla3 responsive Protostar template
Presentatie joomla3 responsive Protostar template
Han 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-ahead
Linda Coonen
 
Joomla Basics Part3
Joomla Basics Part3Joomla Basics Part3
Joomla Basics Part3
Linda 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.
 

Viewers also liked (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 to Tweaking your Template: Joomla Day Boston 2014 Barb Ackemann

Intro to OOCSS Workshop
Intro to OOCSS WorkshopIntro to OOCSS Workshop
Intro to OOCSS Workshop
Julie Cameron
 
Theming moodle technical
Theming moodle   technicalTheming moodle   technical
Theming moodle technicalAlex Walker
 
Untangling spring week5
Untangling spring week5Untangling spring week5
Untangling spring week5
Derek 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 meetup
Brian Cavalier
 
OOCSS for JavaScript Pirates jQcon Boston
OOCSS for JavaScript Pirates jQcon BostonOOCSS for JavaScript Pirates jQcon Boston
OOCSS for JavaScript Pirates jQcon Boston
John Hann
 
Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temy
Juraj Kiss
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4
imdurgesh
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
Razvan Raducanu, PhD
 
Boot strap
Boot strapBoot strap
Boot strap
Wahidullah Habib
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
Kyle 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 website
Odoo
 
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 Patterns
Plasterdog Web Design
 
File Upload 2015
File Upload 2015File Upload 2015
File Upload 2015
Choon Keat Chew
 
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 Surgery
Rational Frank
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4
Derek Jacoby
 

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

Recently uploaded

Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 

Recently uploaded (20)

Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 

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

Editor's Notes

  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.