[PHPTAL] Table with two array problem

2011-06-28 Thread Teis Lindemark
Hi, I am new to use PHPTal and so far, I like it. It's great to separate php code and the xhtml code. One of my list need some data from two arrays. I have one array array1 that I use tal:repeat="offers jobOffers" and find the content like this: tal:content="offers/name" for example. One of

SV: [PHPTAL] Table with two array problem

2011-06-28 Thread Teis Lindemark
so PHPTal moves on to the next option in the value chain (using the | character) and instead picks up the string 'no match'. I hope this is what you were trying to do :) If you need something more like 'in_array' where you need to hunt through the values in otherArray to find a

SV: SV: [PHPTAL] Table with two array problem

2011-06-28 Thread Teis Lindemark
ray = $tmpArray(); unset($tmpArray); then: Pozdrawiam Piotr KroczyƄski W dniu 28.06.2011 17:41, Teis Lindemark pisze: > Okey, thanks for the quick answer. > > But my otherArray is at format Array([0] => Array([idoffer] => > INTEGER [name] => STRING) [1] ... > >

[PHPTAL] Tal:condition question

2011-07-13 Thread Teis Lindemark
Hi, I am sitting with a page where I have a menu where the design is defined as a macro. In this menu, I want to have one of the elements that is "Login" or "Logout" depends on the user is logged in or logged out. So I was thinking that tal:condition could do this for me. I have a function

SV: [PHPTAL] Tal:condition question

2011-07-13 Thread Teis Lindemark
you've set variable "l" in your template, you can just write Logout Login That will do :) Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 13 July 2011 09:21, Teis Lindemark wrote: Hi, I am sitting with a page where I have a menu where the design is def

[PHPTAL] tal:attributes and checkboxes

2011-07-13 Thread Teis Lindemark
Hi, The website I am working on now has a list where the user should click on a checkbox and then have then could check the items the user want and this should be used later. When I started doing this, I created the the checkbox like this: Then I was thinking that I should place this in a array

[PHPTAL] tal:condition question

2011-09-23 Thread Teis Lindemark
Hi, I have a list in my application where the first column should be one icon if the id of the offer is in an array or another icon otherwise. The array that have some icons looks something like this: $tmp[id] = 1 or 0. If id is 1, I should have one icon and another if 0. I added the array t