SlideShare a Scribd company logo
Best Practices for Building Sites
           in dotCMS
 Presenters:
 Click to edit Master subtitle style
 Michael Fienen – Pittsburg State University, nuCloud LLC, .eduGuru
 Maria Bouza – dotCMS




  @fienen - google.com/profiles/fienen
What we're looking at...
1)Container Must-haves
2)Template vs. Containers
3)Using VTL Files, when and where
4)Widgets
5)URLMap for Detail Pages
6)Custom Forward Pages
7)Valid HTML and 508 Compliance
Container Must-haves
•
    Functional Template Include
    –
        Inserted at the top of templates to include data
        and information
    –
        Loads before <html> tag
    –
        No visual elements included
    –
        Good for:
         •   Global Variables
         •   Macro testing
         •   Timestamps for CSS/JS cachebusters
Example Include Container:
Container Must-haves
•
    Meta Container
    –
        Page Title, Friendly Name and Title for Page details
    –
        HTML Page Meta tags: $!HTMLPAGE_META
          – Good for meta keywords, descriptions, or
            other things you need in the <head> per page 
    –
        Include all common CSS Files
    –
        Include all common JS files
    –
        Lives inside the <head>...</head> tags
Example Meta Container:
Container Must-haves
•
    Statistics Container
    –
        Create one container that holds your Statistics
        code, such as Google Analytics
    –
        Container will normally be included at the end of
        all templates
    –
        If multiple hosts, use Host Property to hold
        Account ID
Example Analytics Container:
Template vs. Containers
•
    dotCMS uses Yahoo Grids (a CSS framework) to create
    HTML used in templates:
    http://developer.yahoo.com/yui/grids/
•
    Try to create small number of templates
•
    Templates should be created only for different layouts,
    the functionality should all be handled through widgets
Template vs. Containers
•
    All reusable sections of the HTML should be
    created as Containers (max contents 0)
•
    All sections of the site that are editable should
    be created as Containers (max contents > 0)
•
    Doctype should be added to template
•
    Head section (<head>) should be created in
    the template to allow to have specific JS and
    CSS files on each template
Looking at Containers
Using VTL files, when and where
•
    Limit use of VTL files only to Simple Widgets
•
    Should not be used as “widgets” parsed from
    containers, content or templates
•
    Should be saved to a central location on the
    site (/application/velocity)
•
    Limit to “application” like functionality
•
    Good as building blocks of complex widgets
•
    Used for source code in some macros
•
    Don’t abuse them!
Widgets
•
    Simple Widgets:
    –
        Use them for dynamic code that does’t need parameters
    –
        Good for generic, dynamic tools (listings, detail page bodies,
        etc...)
•
    Structured Widgets (Widgets that receive
    parameters)
    –
        When the widget needs to be reused on different sections of the
        site
    –
        When we need to send parameters to the widget
    –
        As a front end for macro setup
Structured Widget for Macro
URLMaps for Detail Pages
•
    Create URLMaps for structures (1.9)
•
    Better for SEO purposes (human-readable):
    http://yoursite.com/news/some-unique-field
•
    Easier to print and share
•
    Make sure your structure has at least one
    unique field to tie to.
•
    Example:
    http://1.9.demo.dotcms.org/news/dotcms-launches-1.9
Building a URLMap
Set Up Custom Forward Pages
●   You already do this for your home page when
    you set up the /cmsHomePage virtual link
    (Vanity URL in 1.9)
●   You can also do this with typical error pages
    with:
    /cms###Page
    ●   Works with 400, 401, 402, 403, and 404
Custom 404 Page Example
Valid HTML and 508 Compliance
•
    Garbage in – garbage out. Validate templates before
    loading them in.
      ●
        HTML Validation
        http://validator.w3.org/
     ●
         508 Compliance
         http://www.contentquality.com/
•
    TinyMCE won't do your job for you (even if it wants
    to try)
•
    Microsoft Word hates the internet
Thanks Boys and Girls!


            Questions?
          Hunt me down:
 http://google.com/profiles/fienen

         dotCMS Cheatsheet:
http://tinyurl.com/dotcmscheatsheet

More Related Content

PPTX
Multi-content Containers in dotCMS 3.0
PDF
Forms as Structured Content
PDF
Keystone.js 101
PPTX
Java script tutorial
PPT
Club website demo
PPTX
Lesson 1 basic html
PPTX
Web essentials
PDF
Using html5 to build offline applications
Multi-content Containers in dotCMS 3.0
Forms as Structured Content
Keystone.js 101
Java script tutorial
Club website demo
Lesson 1 basic html
Web essentials
Using html5 to build offline applications

What's hot (20)

PPTX
Super quick introduction to html5
PPT
Html intro
PDF
Webpack: What it is, What it does, Whether you need it
PPTX
Full stack development using javascript what and why - ajay chandravadiya
PPT
PDF
Dangerous CSS
PDF
Making Multisite Work for You
PPTX
Introduction to web application development
PDF
Club website demo
PPTX
Web Pages
KEY
Front end-design and best practices
PPTX
How to Build a Bespoke Page Builder in WordPress
PDF
WordPress Development in the Enterprise
PDF
Wordcamp Wilmington Wordpress 101
PDF
Word press 2017 hosting
PDF
MongoBoston - MongoHQ
PPTX
Introduction to maya
PPTX
Developing JavaScript Widgets
PPT
Expert guide for PHP
PPTX
Web storage
Super quick introduction to html5
Html intro
Webpack: What it is, What it does, Whether you need it
Full stack development using javascript what and why - ajay chandravadiya
Dangerous CSS
Making Multisite Work for You
Introduction to web application development
Club website demo
Web Pages
Front end-design and best practices
How to Build a Bespoke Page Builder in WordPress
WordPress Development in the Enterprise
Wordcamp Wilmington Wordpress 101
Word press 2017 hosting
MongoBoston - MongoHQ
Introduction to maya
Developing JavaScript Widgets
Expert guide for PHP
Web storage
Ad

Viewers also liked (20)

PDF
Going Multi-Tenant with dotCMS
PDF
SEO
PDF
Systems Integration in the Cloud Era with Apache Camel @ ApacheCon Europe 2012
PDF
How to Easily Create a Page in Sitecore
PPTX
Diffusion-Limited Aggregation
PPT
Ikaskuntza eta jarrera 2011 4. gaia
PPT
Novidades do .Net 4.0
PPT
Landing local customers webinar final
PPTX
Profil tik cerdas
KEY
Open Source
PDF
T2, Week 10
PPT
Social Media For Small Business 5 10 11
PPT
Linked In Mc Kee Consulting Llc Ata 09 Pca Final
PPT
Sql Data Services
PPTX
Mobilizing Communities in a Connected Age Funders Edition
PDF
Auto-loading of Drupal CCK Nodes
PDF
Pov Big Data And Bmi V F
PDF
e-politics project
PPTX
2ª Investidura em Granito
PDF
Skema Stpm Pam Kertas1 Set2
Going Multi-Tenant with dotCMS
SEO
Systems Integration in the Cloud Era with Apache Camel @ ApacheCon Europe 2012
How to Easily Create a Page in Sitecore
Diffusion-Limited Aggregation
Ikaskuntza eta jarrera 2011 4. gaia
Novidades do .Net 4.0
Landing local customers webinar final
Profil tik cerdas
Open Source
T2, Week 10
Social Media For Small Business 5 10 11
Linked In Mc Kee Consulting Llc Ata 09 Pca Final
Sql Data Services
Mobilizing Communities in a Connected Age Funders Edition
Auto-loading of Drupal CCK Nodes
Pov Big Data And Bmi V F
e-politics project
2ª Investidura em Granito
Skema Stpm Pam Kertas1 Set2
Ad

Similar to Best Practices for Building Sites in dotCMS (20)

PPT
Newspapers with WordPress
PDF
Implementing a Symfony Based CMS in a Publishing Company
PDF
Web Design
PDF
WordPress Intermediate Workshop
KEY
A Framework for TemplaVoila Tutorial: T3CON09-Dallas
PPTX
Word Press As A Cms
PDF
Building a website with Wordpress
PDF
Advanced WordPress: Session II
PDF
WordPress Beginners Workshop
PDF
Tech 802: Web Design Part 2
PPTX
Intro to Building & Marketing Your Own Website
PPTX
e-business
PPT
Emkane RCC wp qs
PPTX
Business 2.0 with WordPress
PDF
Improving Site Design and Usability
PPTX
#SEASPC: Organizing Documents in SharePoint 2010
PDF
Hands On WordPress SEO Mozinar - June 4, 2013
PPT
On-Site SEO Web 2.0 Expo 2010
KEY
FatWire Tutorial For Site Studio Developers
Newspapers with WordPress
Implementing a Symfony Based CMS in a Publishing Company
Web Design
WordPress Intermediate Workshop
A Framework for TemplaVoila Tutorial: T3CON09-Dallas
Word Press As A Cms
Building a website with Wordpress
Advanced WordPress: Session II
WordPress Beginners Workshop
Tech 802: Web Design Part 2
Intro to Building & Marketing Your Own Website
e-business
Emkane RCC wp qs
Business 2.0 with WordPress
Improving Site Design and Usability
#SEASPC: Organizing Documents in SharePoint 2010
Hands On WordPress SEO Mozinar - June 4, 2013
On-Site SEO Web 2.0 Expo 2010
FatWire Tutorial For Site Studio Developers

More from Michael Fienen (12)

PDF
Acceptable application of analytics for your academic areas
PDF
My God, It's Full of Stars: Your Guide to a Visual Design Career
PDF
Got centerpiece? (#hewebar 2013 edition)
PDF
Creatively Common (#BootCamp12)
PDF
The Web is Human
PDF
Sharing Superheroes - J.Boye Philadelphia 2012 Keynote
PDF
(re)Mix010gy (long version)
PDF
Chaos in Context: Informed Design Through Analytics
PDF
(re)Mix010gy
PDF
Head First Video Strategy
PDF
Got Centerpiece? So Does Everyone Else.
PPS
Check Mini Yields Big Results
Acceptable application of analytics for your academic areas
My God, It's Full of Stars: Your Guide to a Visual Design Career
Got centerpiece? (#hewebar 2013 edition)
Creatively Common (#BootCamp12)
The Web is Human
Sharing Superheroes - J.Boye Philadelphia 2012 Keynote
(re)Mix010gy (long version)
Chaos in Context: Informed Design Through Analytics
(re)Mix010gy
Head First Video Strategy
Got Centerpiece? So Does Everyone Else.
Check Mini Yields Big Results

Recently uploaded (20)

PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PPTX
1. Introduction to Computer Programming.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Getting Started with Data Integration: FME Form 101
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Group 1 Presentation -Planning and Decision Making .pptx
Tartificialntelligence_presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
1. Introduction to Computer Programming.pptx
Empathic Computing: Creating Shared Understanding
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectroscopy.pptx food analysis technology
Encapsulation_ Review paper, used for researhc scholars
A comparative study of natural language inference in Swahili using monolingua...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
Getting Started with Data Integration: FME Form 101
cloud_computing_Infrastucture_as_cloud_p
A comparative analysis of optical character recognition models for extracting...
Accuracy of neural networks in brain wave diagnosis of schizophrenia

Best Practices for Building Sites in dotCMS

  • 1. Best Practices for Building Sites in dotCMS Presenters: Click to edit Master subtitle style Michael Fienen – Pittsburg State University, nuCloud LLC, .eduGuru Maria Bouza – dotCMS @fienen - google.com/profiles/fienen
  • 2. What we're looking at... 1)Container Must-haves 2)Template vs. Containers 3)Using VTL Files, when and where 4)Widgets 5)URLMap for Detail Pages 6)Custom Forward Pages 7)Valid HTML and 508 Compliance
  • 3. Container Must-haves • Functional Template Include – Inserted at the top of templates to include data and information – Loads before <html> tag – No visual elements included – Good for: • Global Variables • Macro testing • Timestamps for CSS/JS cachebusters
  • 5. Container Must-haves • Meta Container – Page Title, Friendly Name and Title for Page details – HTML Page Meta tags: $!HTMLPAGE_META – Good for meta keywords, descriptions, or other things you need in the <head> per page  – Include all common CSS Files – Include all common JS files – Lives inside the <head>...</head> tags
  • 7. Container Must-haves • Statistics Container – Create one container that holds your Statistics code, such as Google Analytics – Container will normally be included at the end of all templates – If multiple hosts, use Host Property to hold Account ID
  • 9. Template vs. Containers • dotCMS uses Yahoo Grids (a CSS framework) to create HTML used in templates: http://developer.yahoo.com/yui/grids/ • Try to create small number of templates • Templates should be created only for different layouts, the functionality should all be handled through widgets
  • 10. Template vs. Containers • All reusable sections of the HTML should be created as Containers (max contents 0) • All sections of the site that are editable should be created as Containers (max contents > 0) • Doctype should be added to template • Head section (<head>) should be created in the template to allow to have specific JS and CSS files on each template
  • 12. Using VTL files, when and where • Limit use of VTL files only to Simple Widgets • Should not be used as “widgets” parsed from containers, content or templates • Should be saved to a central location on the site (/application/velocity) • Limit to “application” like functionality • Good as building blocks of complex widgets • Used for source code in some macros • Don’t abuse them!
  • 13. Widgets • Simple Widgets: – Use them for dynamic code that does’t need parameters – Good for generic, dynamic tools (listings, detail page bodies, etc...) • Structured Widgets (Widgets that receive parameters) – When the widget needs to be reused on different sections of the site – When we need to send parameters to the widget – As a front end for macro setup
  • 15. URLMaps for Detail Pages • Create URLMaps for structures (1.9) • Better for SEO purposes (human-readable): http://yoursite.com/news/some-unique-field • Easier to print and share • Make sure your structure has at least one unique field to tie to. • Example: http://1.9.demo.dotcms.org/news/dotcms-launches-1.9
  • 17. Set Up Custom Forward Pages ● You already do this for your home page when you set up the /cmsHomePage virtual link (Vanity URL in 1.9) ● You can also do this with typical error pages with: /cms###Page ● Works with 400, 401, 402, 403, and 404
  • 18. Custom 404 Page Example
  • 19. Valid HTML and 508 Compliance • Garbage in – garbage out. Validate templates before loading them in. ● HTML Validation http://validator.w3.org/ ● 508 Compliance http://www.contentquality.com/ • TinyMCE won't do your job for you (even if it wants to try) • Microsoft Word hates the internet
  • 20. Thanks Boys and Girls! Questions? Hunt me down: http://google.com/profiles/fienen dotCMS Cheatsheet: http://tinyurl.com/dotcmscheatsheet