[PHPTAL] How to write a sort link for table headers

2010-07-30 Thread Richard Dyce
Hi, Sorry for the newbie question - I'm trying to work out how to rewrite a link at the top of a table that sorts the table by column... At present, I'm using: th tal:repeat=item fields a href=?criteria=${criteria}amp;column=${repeat/item/key} tal:content=repeat/item/key field name/a /th

[PHPTAL] How to write a sort link for table headers

2010-07-30 Thread Richard Dyce
Apologies for double-post - did a reply to a previous posting rather than start new thread. Sorry! Hi, Sorry for the newbie question - I'm trying to work out how to rewrite a link at the top of a table that sorts the table by column... At present, I'm using: th tal:repeat=item fields a

Re: [PHPTAL] How to write a sort link for table headers

2010-07-30 Thread Richard Dyce
idiomatic that I should have used instead? dd On 30 Jul 2010, at 16:47, Richard Dyce wrote: Apologies for double-post - did a reply to a previous posting rather than start new thread. Sorry! Hi, Sorry for the newbie question - I'm trying to work out how to rewrite a link at the top

[PHPTAL] PHPTAL and form macros

2010-08-02 Thread Richard Dyce
Hi, Just a pre-re-invent-the-wheel inquiry... Does anyone have an example of macros for formatting form fields in phptal? I have an older framework which create field objects based on the data and type, and populates them from a simple array: e.g. ?php $fields = array( 'id'=

Re: AW: [PHPTAL] PHPTAL and form macros

2010-08-02 Thread Richard Dyce
Per, That's a great help. Yes, the model is massively simplified, but I figured it was better to explain what I was getting at... I take your point about ugliness! On 2 Aug 2010, at 20:20, Per Bernhardt wrote: So keep improving your model! By the way: You should always prefer strong

Re: [PHPTAL] PHPTAL and form macros

2010-08-03 Thread Richard Dyce
Robert, That sounds very interesting, I'll look forward to seeing it. I've had a few private emails from people suggesting php pre-rendering with structures, or using Zend Forms. I thought I should make it clear that the reason that I'm not looking to go down that path is that that's where

Re: [PHPTAL] PHPTAL and form macros

2010-08-03 Thread Richard Dyce
to support plural translations and rendering various Zend elements such as Dates. Robert On 3 Aug 2010, at 09:34, Richard Dyce wrote: Robert, That sounds very interesting, I'll look forward to seeing it. I've had a few private emails from people suggesting php pre-rendering with structures