[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: field name where I've captured incoming values in the GET ... $template->column = array_key_exists('column', $_GET)) ? htmlsp

[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: field name where I've capture

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

2010-07-30 Thread Richard Dyce
I've got it to work with: field name but I was wondering if there's something more 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 >

[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. array('label'=>'', 'type'=>'hidden', 'v

Re: [PHPTAL] PHPTAL and form macros

2010-08-02 Thread Richard Dyce
:-) I take your point... Yes, I do have a framework - but it's not the framework I'm currently using! On 2 Aug 2010, at 20:17, Kornel LesiƄski wrote: > On 02.08.2010, at 19:27, Richard Dyce wrote: >> >> Just a pre-re-invent-the-wheel inquiry... Does anyone have an

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 > class

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 I've

Re: [PHPTAL] PHPTAL and form macros

2010-08-03 Thread Richard Dyce
:) > > As a side note, we've also integrated Zend_Translate support into PHPTal and > created a number of Tales to support plural translations and rendering > various Zend elements such as Dates. > > Robert > > On 3 Aug 2010, at 09:34, Richard Dyce wrote: >

Re: [PHPTAL] refer to array in php:

2011-05-19 Thread Richard Dyce
> blah blah Do you need the single quotes perhaps? On 19 May 2011, at 14:02, GRolf wrote: > > > I have set an array to my PHPTal: > > $phptal->person = array('first_name'=>'John', 'last_name'=>'Doe'); > > > Works fine to retrieve those values in my template > > ${person/first_name} > >