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
1
vote
1 answer

Using tal:content and getting

I am using Zend Framework with PHPTAL templates for view sites. Problem is that I have that contains tal:content = value. Value is the field (string) from database which contains html tag
. When I try to get this field from db, I don't…
wtomko
  • 35
  • 6
1
vote
1 answer

How can I have attributes that get extracted for i18n in ZPT macros?

I'm using Pyramid with ZPT templates to make a web app. I'm attempting to make a form template macro library to make life easier for things like setting current values of form fields, etc. I'm also using the lingua message extractors to…
David Roe
  • 1,228
  • 1
  • 11
  • 15
1
vote
1 answer

PHPTAL and CSV in array

I have data in CSV format: $result->names = array(array('x,y,z'),array('a,b,c')); for example: item.names = 'a,b,c' this code doesn't work:
Colargol
  • 749
  • 4
  • 14
  • 26
1
vote
2 answers

What specific issue try zope folks to solve with TAL, TALES & METAL

TAL, TALES and METAL are all three the zope templating language. The thing that I don't understand is why so much troubles. I don't understand the spirit of ZTL, any tips ? one more question : is there a standalone library that try to achieve the…
amirouche
  • 7,682
  • 6
  • 40
  • 94
1
vote
2 answers

phptal: how do I repeatedly add attributes?

I got a phptal template question, I have an associative array which contains HTML attribute information, e.g. attrs['href'] = 'www.google.com'; attrs['id'] = 'the_link'; ... Is there a way to use the "repeat" to loop through my array and generate…
James Lin
  • 25,028
  • 36
  • 133
  • 233
1
vote
1 answer

PHPTAL and specific table

I have to create specific table in PHPTAL. I have array like that: $tab = array('item1', 'item2', 'item3', 'item4'); Final table should be look like that: …
kodziek
  • 41
  • 1
  • 7
1
vote
3 answers

Checking for empty variable in PHPTAL condition

In PHPTAL tal:condition can check is variable empty? Something like that: < tag tal:condition="var" >Some text< /tag > but the value of variable is like that: var = $variable; ?> And it's a problem 'cause PHPTAL that…
kodziek
  • 41
  • 1
  • 7
1
vote
2 answers

PHPTAL Nested Repeat

I am having an problem trying to achieve a nested repeat in PHPTAL:
James Lin
  • 25,028
  • 36
  • 133
  • 233
1
vote
1 answer

Tal condition string contains

Trying to change table data based on conditions.
string.stringname may have -shadow at the very…
Jer_TX
  • 465
  • 4
  • 20
1
vote
1 answer

Using ZPT in Google App Engine

Has anyone tried using ZPT in Google App Engine? If yes, please let me know how. Thanks in advance. EDIT: An example at http://gae-zpt.appspot.com/ by DisplacedAussie https://stackoverflow.com/users/2962/displacedaussie It can be downloaded from…
Viet
  • 17,944
  • 33
  • 103
  • 135
1
vote
1 answer

Save a subdomain name to String

It's a rather unusual request, but is it possible to extract a subdomain to a variable? e.g. (1) sub1.mydomain.com (2) sub2.mydomain.com When I click on (1) I want to save "sub1" and vice versa. I use plone (python and tal). Thx for your input.
dustinboettcher
  • 495
  • 1
  • 6
  • 19
1
vote
2 answers

Pyramid Chameleon Tal:condition 'Not' issue

I am trying to display conditional text in a Pyramid Chameleon template. Basically, checking if the dictionary key 'maxed_out_alerts' is empty (false) or has a string 'yes' in it.

Maxed Out.

fat fantasma
  • 7,483
  • 15
  • 48
  • 66
1
vote
1 answer

dynamicly fill table using zpt and ajax as update

I'm creating a webproject in pyramid where I'd like to update a table every few secondes. I already decided to use ajax, but I'm stuck on something. On the client side I'm using the following code: function update() { var variable =…
GertV
  • 831
  • 2
  • 10
  • 23
1
vote
2 answers

Give each table a new id using zpt

I'm using the tal:repeat statement to generate tables inside another table. Sadly I do not know how to give each table an unique id when generated. How can I do this? I'm trying to use: tal:attributes="id myindex" and tal:attributes="id…
GertV
  • 831
  • 2
  • 10
  • 23
1
vote
1 answer

Plone 4 Zope Display Contents of specific folder TALES

Problem I have a customer that wishes to display the entire contents of a certain folder (containing images) on their search page, should the search return 0 results. The folder is located at mysite.com/images Setup: As a test environment I have…
Dan
  • 958
  • 2
  • 11
  • 25
Item1 Item2
${business/trading_name} HOW?????? Stuff Stuff