Questions tagged [template-tal]

TAL (Template Attribute Language) is a XML-attribute based templating language standard, used by Zope Page Templates, Chameleon, PHPTAL and other templating libraries.

TAL (Template Attribute Language) is a XML-attribute based templating language standard, used by Zope Page Templates, Chameleon and other templating libraries.

A sister language METAL (Macro Expansion Template Attribute Language) adds macro capabilities to TAL; use the tag for questions specific to macro handling.

The language is aimed at making collaboration between designers and programmers easier, by hiding all templating constructs in XML or HTML attributes, allowing a template editor to create and maintain templates that still render in a browser.

Use this tag for general TAL syntax questions. Consider using the , or tags as needed if the question is specific to an implementation.

90 questions
0
votes
1 answer

TAL Condition in Plone to hide HTML if it's a Document (Page)

I'm trying to modify my /portal_view_customizations/zope.interface.interface-plone.belowcontenttitle.documentbyline template with a tal expression, so that the document's author and the modification date do not show if the current portal type is a…
elmor
  • 310
  • 1
  • 17
0
votes
1 answer

Using tal:repeat variable in tal:condition, Chameleon

I'm using pyramid with Chameleon and I try to add a class to a link dependent of the page number with tal:condition. When I replace page_number for a string it's working but the code below isn't. So something is wrong with the page_number. Any help…
Jab
  • 821
  • 3
  • 13
  • 26
0
votes
2 answers

How to check if string exists in template?

I'm returning a string body_class to my view. I can't seem to put in a condition without breaking it: Kinda works. It outputs the body class but the rest…
izolate
  • 1,590
  • 4
  • 22
  • 35
0
votes
1 answer

Accessing view reference in TAL with "python" namespace prefix

How to access view reference (and its members) when TAL is used with python namespace prefix? For example, I got reference on records property of the current view: How do I achieve the same with python…
rook
  • 5,880
  • 4
  • 39
  • 51
0
votes
1 answer

tal:condition not performing condition check

I have the following tal condition code that in theory is supposed to work, but it is not performing the condition check. the form hits this condition, runs it and then returns a divide by 0 division error instead of a 0 Im working with incomplete…
John
  • 45
  • 1
  • 5
0
votes
1 answer

how to get a reference to GLOBALS php variable inside template using Phptal

Below line tal:attributes="action php:GLOBALS['paypal']['url']" raises: PHPTAL_VariableNotFoundException' with message 'Unable to find variable 'GLOBALS' in current scope' while tal:attributes="action php:GLOBALS['paypal']['url']" works
0
votes
1 answer

How to use HTML5 Boilerplate in a ZPT?

I'm trying to update one of our older ZPT based applications and I would like to implement the following HTML5 Boilerplate best practice for adding conditional IE classes to the .