[Zope] How do you get custom made portal tabs to highlight
David Pratt
fairwinds at eastlink.ca
Sat Mar 25 11:15:06 EST 2006
Hi Julian. The actions tool allows you to group actions. CMF on its own
has nothing called portal tabs. This is Plone talk I believe. If you are
developing in CMF which I am assuming, you are speaking of actions. Any
object type can provide actions. In any case, it boils down to writing a
script or two and including a conditional statement in your template to
provide a class that you can style with your css.
Your python script(s) must:
1) Gather the actions you are interested in evaluating
2) Obtain the current URL and determine whether it matches an action
from the actions you wish to evaluate (whether it is a part of the path
or name). You will note that all actions have ids and a URL so this
helps with this comparison.
Once you have some logic that correctly isolates the correct action
based on the current URL, write a zpt condition in your template(s) to
provide a class attribute in your html that you can style. It is common
to give this attribute a name such as 'selected' for a horizontal or
vertical menu for semantic purposes.
You should examine the api for the actions tool. The main_template in
CMF groups object actions, folder actions, workflow actions etc as an
example. Hope this helps.
Regards,
David
JulianRead wrote:
> Hi i have made 3 portal tabs which link to 3 different pages in my site. (
> In the same way that in www.plone.org there are the portal tabs home, about,
> documentation etc. )
>
> I am trying to find out how to highlight these tabs when the user is in that
> corresponding page or its subpages.
More information about the Zope
mailing list