Hiding a column at the root of a plone site ...

Paul Ertz pertz at silo.lib.ia.us
Thu Feb 23 12:00:22 EST 2006


Hello,

We would like to hide the left column for the main/home page of our 
plone sites dynamically using a tal: expression. I figured out that I 
need to customize the main_template file something like this:

  <td id="portal-column-one"
        metal:define-slot="column_one_slot"
        tal:define="sectionlevel "
        tal:condition="<if home/main page of plone site hide this column>">

What I haven't figured out, is how to identify that the current page is 
the home page/at the root of the plone site. I found some examples on 
the various lists and google, but have not been able to make them work.

python:here == here.portal_url.getPortalObject()
python: here.meta_type != 'Plone Site'" 
python:here.getSectionFromURL()!='section-index' <works as long as the 
main page is index and not front-page>

The below seems to work, but it seems like a hacky way to do 
things.tal:condition="python:here.getSectionFromURL()!='section-index' 
and here.getSectionFromURL()!='section-front-page'">

What it comes down to, I think, is wanting to check if we are at the 
root (top) of the plone site or not.

Thanks much for any help.
paul ertz




More information about the Python-list mailing list