SlideShare una empresa de Scribd logo
1 de 27
Creating Custom Templates
      for Joomla! 2.5
   Dallas/Fort Worth Joomla User Group
               January 14, 2013
     www.KatalystCreativeGroup.com
A Bit About Me: Don Cranford

• Partner / Lead Developer at Katalyst Creative
  Group
  • Web Design/Dev, Branding, Content, SEO
• Started using Joomla! (Mambo) in 2004
• Joomla! is our primary tool, but also do some
  WordPress and Drupal.
• Custom Joomla! templates and extensions.


                 www.KatalystCreativeGroup.com
Today We’ll Cover:

• Custom Template Basics for Joomla! 2.5
  •   File Structure
  •   templateDetails.xml
  •   index.php
  •   CSS




                    www.KatalystCreativeGroup.com
Today We’ll Cover:

• Advanced Topics
  • HTML Overrides
  • Parameters
  • Language Overrides
• Installation




                 www.KatalystCreativeGroup.com
Creating Custom Templates for Joomla! 2.5

THE BASICS
Template File Structure

• Required Files:
  •   index.php
  •   templateDetails.xml
  •   template_thumbnail.png
  •   css folder
       • Folder must be named “css”




                      www.KatalystCreativeGroup.com
Template File Structure

• Optional Files
  •   html (folder… used for overrides)
  •   language (for language overrides)
  •   error.php (to override 404… errors page layout)
  •   component.php (to override component layout)
  •   template_preview.png




                    www.KatalystCreativeGroup.com
Template File Structure

• Show image here…




               www.KatalystCreativeGroup.com
templateDetails.xml

• Used during the installation process
  • Tells what files to install
• Provides the optional parameters
  • Used in configuring the style options.




                     www.KatalystCreativeGroup.com
templateDetails.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 2.5//DTD template 1.0//EN"
"http://www.joomla.org/xml/dtd/1.6/template-install.dtd">
<extension version="2.5" type="template" client="site">
      <name>mytemplate1</name>
      <creationDate>January 14, 2013</creationDate>
      <author>My Name</author>
      <authorEmail>My Email</authorEmail>
      <authorUrl>http://www.my-url.com</authorUrl>
      <copyright>Copyright Info Goes Here</copyright>
      <license>Copyright License Goes Here</license>
      <version>2.5.0</version>
      <description>TPL_MYTEMPLATE1_XML_DESCRIPTION</description>




                              www.KatalystCreativeGroup.com
templateDetails.xml
  <files>
        <folder>css</folder>
        <folder>html</folder>
        <folder>images</folder>
        <folder>javascript</folder>
        <folder>fonts</folder>
        <folder>language</folder>
        <filename>index.php</filename>
        <filename>templateDetails.xml</filename>
        <filename>template_preview.png</filename>
        <filename>template_thumbnail.png</filename>
        <filename>component.php</filename>
        <filename>error.php</filename>
  </files>




                             www.KatalystCreativeGroup.com
templateDetails.xml
  <positions>
       <position>debug</position>
       <position>position-0</position>
       <position>position-1</position>
       <position>position-2</position>
       …
       <position>position-15</position>
  </positions>

  <languages folder="language">
       <language tag="en-GB">en-GB/en-GB.tpl_mytemplate1.ini</language>
       <language tag="en-GB">en-GB/en-GB.tpl_mytemplate1.sys.ini</language>
  </languages>




                          www.KatalystCreativeGroup.com
templateDetails.xml
     <config>
          <fields name="params">
                <fieldset name="advanced">
                       <field name="wrapperSmall" type="text" default="53"
                             label="TPL_MYTEMPLATE1_FIELD_WRAPPERSMALL_LABEL"
                             description="TPL_MYTEMPLATE1_FIELD_WRAPPERSMALL_DESC"
                             filter="integer" />
                      …
                </fieldset>
          </fields>
     </config>
</extension>




                               www.KatalystCreativeGroup.com
index.php
• The primary file that controls the layout.
• Can use regular php within the file
• Uses tags (<jdoc include type=“…” />) to
  determine where to output different pieces
  •   <jdoc include type=“head” />
  •   <jdoc include type=“component” />
  •   <jdoc include type=“module” name=“*position+” />
  •   <jdoc include type=“message” />



                   www.KatalystCreativeGroup.com
Creating Custom Templates for Joomla! 2.5

ADVANCED TOPICS
Html Overrides: What Are They?

• Override the layout for any MVC components
  and modules
  • MVC = Model, View, Controller
• Gives Joomla tremendous flexibility!




                  www.KatalystCreativeGroup.com
Html Overrides: How To?
• Create folder name that corresponds to
  component or module under html
• Create folder name that corresponds to the
  view name (ie. html/com_content/article)
• Create default.php file
  • Can copy from the original as a starting point
• Ex: html/com_content/article/default.php


                   www.KatalystCreativeGroup.com
Template Parameters
• Derived from the templateDetails.xml
  • <config><fields name=“params”>…</fields></config>
• Each parameter defined as a field
  <field name=“…” type=“text” default=“…”
      label=“*language string from language file+”
      description=“*language string+” />




                    www.KatalystCreativeGroup.com
Template Parameters

• Access in the index.php with:
  • $this->params->get(‘*parameter field name+');




                  www.KatalystCreativeGroup.com
Template Parameters
Configure the parameters in the Joomla Template admin




                       www.KatalystCreativeGroup.com
Language: Files & Overrides

• Provides the text for the language strings in
  the template
• Two files in the language/en-GB/ folder
  • en-GB.tpl_mytemplate1.ini
     • Language strings used in the template
  • en-GB.tpl_mytemplate1.sys.ini
     • Language strings used in installation and admin




                     www.KatalystCreativeGroup.com
Creating Custom Templates for Joomla! 2.5

INSTALLATION
Installation
• Create archive (.zip or .tar.gz) file
   • Install like any other extension in Control Panel
   • Extensions >> Extension Manager >> Install
• Discover
   •   Copy folder and files to templates directory
   •   Extensions >> Extension Manager >> Discover
   •   Click Discover button
   •   Select and install


                     www.KatalystCreativeGroup.com
Creating Custom Templates for Joomla! 2.5

FOR MORE GUIDANCE
Resources
• http://magazine.joomla.org/issues/issue-may-
  2012/item/740-How-to-convert-Joomla-15-template-to-
  Joomla-25

• http://docs.joomla.org/Category:Template_Development




                     www.KatalystCreativeGroup.com
Get In Touch

•   www.katalystcreativegroup.com
•   dcranford@katalystcg.com
•   @katalystsol.com
•   817-900-8787




                  www.KatalystCreativeGroup.com
Creating Custom Templates
      for Joomla! 2.5
    www.KatalystCreativeGroup.com

Más contenido relacionado

La actualidad más candente

What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)Ahsan Rahim
 
Fundamentals of web_design_v2
Fundamentals of web_design_v2Fundamentals of web_design_v2
Fundamentals of web_design_v2hussain534
 
Getting started with drupal 8 code
Getting started with drupal 8 codeGetting started with drupal 8 code
Getting started with drupal 8 codeForum One
 
Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3Wahyu Putra
 
Html css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workHtml css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workAlbino Tonnina
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and DevelopmentShagor Ahmed
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoPaul Withers
 
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...Wahyu Putra
 
Introduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghIntroduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghAnkitkumar Singh
 
HTML 5 Fundamental
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 FundamentalLanh Le
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1Mudasir Syed
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3Anjan Mahanta
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3Anjan Mahanta
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Dave Wallace
 
HTML Lecture Part 1 of 2
HTML Lecture Part 1 of 2HTML Lecture Part 1 of 2
HTML Lecture Part 1 of 2Sharon Wasden
 

La actualidad más candente (20)

What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
HTML5
HTML5 HTML5
HTML5
 
Introduction to WEB HTML, CSS
Introduction to WEB HTML, CSSIntroduction to WEB HTML, CSS
Introduction to WEB HTML, CSS
 
Fundamentals of web_design_v2
Fundamentals of web_design_v2Fundamentals of web_design_v2
Fundamentals of web_design_v2
 
Html and html5 cheat sheets
Html and html5 cheat sheetsHtml and html5 cheat sheets
Html and html5 cheat sheets
 
Getting started with drupal 8 code
Getting started with drupal 8 codeGetting started with drupal 8 code
Getting started with drupal 8 code
 
Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3
 
Html css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workHtml css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers work
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and Development
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The Dojo
 
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
3 Langkah Mudah Membuat Website Dakwah (User Friendly - SEO Friendly - Mobile...
 
HTML/CSS Lecture 1
HTML/CSS Lecture 1HTML/CSS Lecture 1
HTML/CSS Lecture 1
 
Introduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghIntroduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar Singh
 
HTML 5 Fundamental
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 Fundamental
 
Joomla Templates101
Joomla Templates101Joomla Templates101
Joomla Templates101
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011
 
HTML Lecture Part 1 of 2
HTML Lecture Part 1 of 2HTML Lecture Part 1 of 2
HTML Lecture Part 1 of 2
 

Destacado

Dynamicmediacenter
DynamicmediacenterDynamicmediacenter
Dynamicmediacentercherio7205
 
Crushed Powerpoint Evaluation Final
Crushed Powerpoint Evaluation FinalCrushed Powerpoint Evaluation Final
Crushed Powerpoint Evaluation Finalguest4710cf8
 
Statistical Analysis for sports
Statistical Analysis for sportsStatistical Analysis for sports
Statistical Analysis for sportssriharshagunnam
 
Business Intelligence for the Home Loan Industry
Business Intelligence for the Home Loan IndustryBusiness Intelligence for the Home Loan Industry
Business Intelligence for the Home Loan Industrysriharshagunnam
 

Destacado (6)

Dynamicmediacenter
DynamicmediacenterDynamicmediacenter
Dynamicmediacenter
 
The Faith of Daniel
The Faith of DanielThe Faith of Daniel
The Faith of Daniel
 
Crushed Powerpoint Evaluation Final
Crushed Powerpoint Evaluation FinalCrushed Powerpoint Evaluation Final
Crushed Powerpoint Evaluation Final
 
Statistical Analysis for sports
Statistical Analysis for sportsStatistical Analysis for sports
Statistical Analysis for sports
 
Nairobi CBD
Nairobi CBDNairobi CBD
Nairobi CBD
 
Business Intelligence for the Home Loan Industry
Business Intelligence for the Home Loan IndustryBusiness Intelligence for the Home Loan Industry
Business Intelligence for the Home Loan Industry
 

Similar a Creating Custom Templates for Joomla! 2.5

Magento mega menu extension
Magento mega menu extensionMagento mega menu extension
Magento mega menu extensionBun Danny
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentationalledia
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentIvan Chepurnyi
 
Template overrides austin
Template overrides   austinTemplate overrides   austin
Template overrides austinChad Windnagle
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyLeslie Doherty
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Lucidworks
 
crtical points for customizing Joomla templates
crtical points for customizing Joomla templatescrtical points for customizing Joomla templates
crtical points for customizing Joomla templatesamit das
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedThe Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedGil Fink
 
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)Mark Hamstra
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developersHernan Mammana
 
Installing OpenCart 3 module
Installing OpenCart 3 moduleInstalling OpenCart 3 module
Installing OpenCart 3 moduleSelf
 
Drupal Themes
Drupal ThemesDrupal Themes
Drupal Themesakosh
 
Developing Your Ultimate Package
Developing Your Ultimate PackageDeveloping Your Ultimate Package
Developing Your Ultimate PackageSimon Collison
 
Vibe Custom Development
Vibe Custom DevelopmentVibe Custom Development
Vibe Custom DevelopmentGWAVA
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bagstuplum
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoFu Cheng
 

Similar a Creating Custom Templates for Joomla! 2.5 (20)

Magento mega menu extension
Magento mega menu extensionMagento mega menu extension
Magento mega menu extension
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
 
Template overrides austin
Template overrides   austinTemplate overrides   austin
Template overrides austin
 
presentation
presentationpresentation
presentation
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
 
crtical points for customizing Joomla templates
crtical points for customizing Joomla templatescrtical points for customizing Joomla templates
crtical points for customizing Joomla templates
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedThe Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has Arrived
 
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
Unleashing Creative Freedom with MODX (2015-09-03 at GroningenPHP)
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
Installing OpenCart 3 module
Installing OpenCart 3 moduleInstalling OpenCart 3 module
Installing OpenCart 3 module
 
Drupal Themes
Drupal ThemesDrupal Themes
Drupal Themes
 
Developing Your Ultimate Package
Developing Your Ultimate PackageDeveloping Your Ultimate Package
Developing Your Ultimate Package
 
Vibe Custom Development
Vibe Custom DevelopmentVibe Custom Development
Vibe Custom Development
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
 
WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojo
 

Último

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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?
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Creating Custom Templates for Joomla! 2.5

  • 1. Creating Custom Templates for Joomla! 2.5 Dallas/Fort Worth Joomla User Group January 14, 2013 www.KatalystCreativeGroup.com
  • 2. A Bit About Me: Don Cranford • Partner / Lead Developer at Katalyst Creative Group • Web Design/Dev, Branding, Content, SEO • Started using Joomla! (Mambo) in 2004 • Joomla! is our primary tool, but also do some WordPress and Drupal. • Custom Joomla! templates and extensions. www.KatalystCreativeGroup.com
  • 3. Today We’ll Cover: • Custom Template Basics for Joomla! 2.5 • File Structure • templateDetails.xml • index.php • CSS www.KatalystCreativeGroup.com
  • 4. Today We’ll Cover: • Advanced Topics • HTML Overrides • Parameters • Language Overrides • Installation www.KatalystCreativeGroup.com
  • 5. Creating Custom Templates for Joomla! 2.5 THE BASICS
  • 6. Template File Structure • Required Files: • index.php • templateDetails.xml • template_thumbnail.png • css folder • Folder must be named “css” www.KatalystCreativeGroup.com
  • 7. Template File Structure • Optional Files • html (folder… used for overrides) • language (for language overrides) • error.php (to override 404… errors page layout) • component.php (to override component layout) • template_preview.png www.KatalystCreativeGroup.com
  • 8. Template File Structure • Show image here… www.KatalystCreativeGroup.com
  • 9. templateDetails.xml • Used during the installation process • Tells what files to install • Provides the optional parameters • Used in configuring the style options. www.KatalystCreativeGroup.com
  • 10. templateDetails.xml <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE install PUBLIC "-//Joomla! 2.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd"> <extension version="2.5" type="template" client="site"> <name>mytemplate1</name> <creationDate>January 14, 2013</creationDate> <author>My Name</author> <authorEmail>My Email</authorEmail> <authorUrl>http://www.my-url.com</authorUrl> <copyright>Copyright Info Goes Here</copyright> <license>Copyright License Goes Here</license> <version>2.5.0</version> <description>TPL_MYTEMPLATE1_XML_DESCRIPTION</description> www.KatalystCreativeGroup.com
  • 11. templateDetails.xml <files> <folder>css</folder> <folder>html</folder> <folder>images</folder> <folder>javascript</folder> <folder>fonts</folder> <folder>language</folder> <filename>index.php</filename> <filename>templateDetails.xml</filename> <filename>template_preview.png</filename> <filename>template_thumbnail.png</filename> <filename>component.php</filename> <filename>error.php</filename> </files> www.KatalystCreativeGroup.com
  • 12. templateDetails.xml <positions> <position>debug</position> <position>position-0</position> <position>position-1</position> <position>position-2</position> … <position>position-15</position> </positions> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.tpl_mytemplate1.ini</language> <language tag="en-GB">en-GB/en-GB.tpl_mytemplate1.sys.ini</language> </languages> www.KatalystCreativeGroup.com
  • 13. templateDetails.xml <config> <fields name="params"> <fieldset name="advanced"> <field name="wrapperSmall" type="text" default="53" label="TPL_MYTEMPLATE1_FIELD_WRAPPERSMALL_LABEL" description="TPL_MYTEMPLATE1_FIELD_WRAPPERSMALL_DESC" filter="integer" /> … </fieldset> </fields> </config> </extension> www.KatalystCreativeGroup.com
  • 14. index.php • The primary file that controls the layout. • Can use regular php within the file • Uses tags (<jdoc include type=“…” />) to determine where to output different pieces • <jdoc include type=“head” /> • <jdoc include type=“component” /> • <jdoc include type=“module” name=“*position+” /> • <jdoc include type=“message” /> www.KatalystCreativeGroup.com
  • 15. Creating Custom Templates for Joomla! 2.5 ADVANCED TOPICS
  • 16. Html Overrides: What Are They? • Override the layout for any MVC components and modules • MVC = Model, View, Controller • Gives Joomla tremendous flexibility! www.KatalystCreativeGroup.com
  • 17. Html Overrides: How To? • Create folder name that corresponds to component or module under html • Create folder name that corresponds to the view name (ie. html/com_content/article) • Create default.php file • Can copy from the original as a starting point • Ex: html/com_content/article/default.php www.KatalystCreativeGroup.com
  • 18. Template Parameters • Derived from the templateDetails.xml • <config><fields name=“params”>…</fields></config> • Each parameter defined as a field <field name=“…” type=“text” default=“…” label=“*language string from language file+” description=“*language string+” /> www.KatalystCreativeGroup.com
  • 19. Template Parameters • Access in the index.php with: • $this->params->get(‘*parameter field name+'); www.KatalystCreativeGroup.com
  • 20. Template Parameters Configure the parameters in the Joomla Template admin www.KatalystCreativeGroup.com
  • 21. Language: Files & Overrides • Provides the text for the language strings in the template • Two files in the language/en-GB/ folder • en-GB.tpl_mytemplate1.ini • Language strings used in the template • en-GB.tpl_mytemplate1.sys.ini • Language strings used in installation and admin www.KatalystCreativeGroup.com
  • 22. Creating Custom Templates for Joomla! 2.5 INSTALLATION
  • 23. Installation • Create archive (.zip or .tar.gz) file • Install like any other extension in Control Panel • Extensions >> Extension Manager >> Install • Discover • Copy folder and files to templates directory • Extensions >> Extension Manager >> Discover • Click Discover button • Select and install www.KatalystCreativeGroup.com
  • 24. Creating Custom Templates for Joomla! 2.5 FOR MORE GUIDANCE
  • 25. Resources • http://magazine.joomla.org/issues/issue-may- 2012/item/740-How-to-convert-Joomla-15-template-to- Joomla-25 • http://docs.joomla.org/Category:Template_Development www.KatalystCreativeGroup.com
  • 26. Get In Touch • www.katalystcreativegroup.com • dcranford@katalystcg.com • @katalystsol.com • 817-900-8787 www.KatalystCreativeGroup.com
  • 27. Creating Custom Templates for Joomla! 2.5 www.KatalystCreativeGroup.com