Quantcast
Viewing all articles
Browse latest Browse all 3535

Anderson Leeb Blog: Use built in theme parameters in Diazo rules

While building the rules.xml file for a project, I needed to insert the value of some of the built in theme parameters as the value for an attribute to a tag. The synax I'm used to from e.g. TAL expressions:

${context}

is a little different than what is used with a Diazo/plone.app.theming theme:

{$path}

The final rule ended up looking like this:

<after css:theme-children="#content article"
if-content='not(//*[@id="portal-column-two"]) and
not(//*[@id="portal-column-one"])' >
<a class="managePortletsFallback" href="{$scheme}://{$host}{$path}/@@manage-portlets">
Manage portlets
</a>
</after>

Viewing all articles
Browse latest Browse all 3535

Trending Articles