You are here: Home / Documentation / How To's / How to give a folder a custom site title

How to give a folder a custom site title

by ledwell published Dec 13, 2011 11:50 AM, last modified Aug 16, 2016 10:50 AM
Allows you to specify a different title (heading for the site) on a folder than what the parent is using based on the URL of the folder.

I cant imagine there being lots of uses for this but there are times when you only need one page that appears to be its own sight with its own heading and its kinda silly to create an entire plone site just for one page. Thank you Nathan Van Gheem for your help Im a hack with tal expressions and that dude is a God! (seriously, hes a God, he smote me the other day) :)

You will need to have ZMI access.

  1. Login
  2. Create a new folder on your site called "testFolder"
  3. Go to "portal_view_customizations" ZMI of the your site
  4.  select the uwosh.themecollege.sitetitle view
  5. replace whats there with
<div id="collegeViewlet">
<div tal:condition="python: '/testFolder' not in request.get('URL', '')">
  <a tal:attributes="href here/portal_url">
    <h1 tal:content="python:here.organization_type" id="organizationType">College of</h1>
    <h1 id="organization" tal:content="view/title" />
<div tal:condition="python: '/testFolder' in request.get('URL', '')">
<a tal:attributes="href here/portal_url">
    <h1 id="organization"> THE TITLE YOU WANT HERE </h1>

Your telling plone to display something different if "testFolder" is NOT in the url. Then telling it what TO display if it is. My guess is theres a conditional statement that might make this a bit smaller but it works for me and I can read it.