Questions tagged [phptal]

PHPTAL is a templating engine for PHP5 that implements the brilliant Zope Page Templates syntax.

PHPTAL is a templating engine for PHP5 that implements the brilliant Zope Page Templates syntax, TAL and METAL.

Tag usage

When asking questions about the template syntax, consider adding (for TAL template constructs) and / or (for METAL macro constructs) as needed.

38 questions
1
vote
1 answer

Integrate PHPTAL template engine into yii framework

I'm wondering that how to integrate PHPTAL into yii framework? I'm using PHPTAL for a long time and it's nice template engine. Although Yii allows integrate another template engine into framework but it still does not support PHPTAL. Thanks for your…
sonnb
  • 418
  • 2
  • 7
1
vote
1 answer

PHPTAL replace but keep certain attributes?

Is it possible to do a tal:replace="whatever" but maintain certain attributes of the element/tag? For example, if you have the following: Is it possible…
Jake Wilson
  • 88,616
  • 93
  • 252
  • 370
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

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
3 answers

PHPTAL - No template file specified

I have an identical site running on two different servers, and for some reason I am presented with the following error message on one of the servers when I either login or logout of the CMS on the site. PHPTAL Exception No template file…
Probocop
  • 10,346
  • 28
  • 85
  • 115
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
0 answers

PHPTAL for ZF2 setup

I am trying to implement PHPTal for my ZF2 application. So far I have only found this github project HERE. But after few hours spent on it I am still unable to use it (there is no doc also linked to it). Except that I haven't been able to find any…
mokk
  • 916
  • 17
  • 35
1
vote
1 answer

PHPTAL: Viewmodel Solution

I've picked up PHPTAL (after coming from PHPMustache), and I'm trying to inject a ViewModel class Mustache-style into my template. Let me explain .. controller $viewmodel = new \Viewmodel\Home(); $template = new…
MickRip
  • 312
  • 1
  • 2
  • 10
1
vote
2 answers

Cleanup Symfonys View Templates

I'm evaluating the PHP webframework: Symfony for a project. Everything is quite well organized so far, except for the view templates which suffer from an unreadable/error prone mix of html and php (I was trying to adapt the views to use clean urls…
BefittingTheorem
  • 10,459
  • 15
  • 69
  • 96
1
vote
1 answer

phptal - using defined variables in php conditions

I would like to use defined variables by phptal within php conditions as follows : ...
Pumpkin
  • 1,993
  • 3
  • 26
  • 32
1
vote
2 answers

Assigning multiple classes to a tag using PHPTAL

I have an array of data I want to output as a UL using PHPTAL (easy) with class attributes supplied by the array (easy), a class attribute for first and for the last element (easy)... all at the same time (hard). Ie. I want to combine:
Steve Almond
  • 413
  • 4
  • 12
1
vote
1 answer

how can i check if a php associative array's key is equal to a defined variable from phptal condition?

i've this problem my phptal view has a variable called data which is an associative array. Let's suppose that i've those Keys M01 M02 and M03 not in a particular order, i've to print to the user view all the data not referred by key M02. How can i…
Marco Capoferri
  • 224
  • 2
  • 12
Item1 Item2
${business/trading_name} HOW??????