Change the Page Title and Crumbtrail Title based on URLMapContent


This snippet shows how to check for URLMapContent in your Template, and change the page title and crumbtrail title accordingly.  

If you have multiple URLMaps and they each use a different field for the title, you can also check for the folder or page name in the $VTLSERVLET_URI variable.

You would put this code at or near the top of your template before your print out the page title.  


  #set($pageTitle = $URLMapContent.title)
  #set($crumbTitle = $URLMapContent.title)
  #set($pageTitle = $friendlyName)
  #set($crumbTitle = $friendlyName)