On 08-11-2010 at 11:53:55 Robert Goldsmith <rgoldsm...@names.co.uk> wrote:

Hi all,

I'd like to create a macro with fillable slots but I'd like the names of these slots to be based on variable information passed to the macro. It appears at the moment that the content of a 'define-slot=""' is not processed like other content and is simply treated as a string. I'd prefer not to resort to macros because all the slots themselves are fully static - I just want to control which of these static slots are inserted at any time. I recognise that one possible suggested solution here might be a collection of conditionals to pick the slot but the macro I'm writing is in a library and the slot names are, therefore, not definable in advance. I hope this makes sense!

In essence, my fill-slot statements are statically named but my define-slot statements need to be able to take variable string content.

Anyone have any ideas?

It's easy to implement (see attached patch), but I'm wondering if you're not trying to do something that's unnecessarily complex, or could be done using existing PHPTAL features.

regards, Kornel

Attachment: variable_slot_name.patch
Description: Binary data

PHPTAL mailing list

Reply via email to