[PHPTAL] runtime generated slot names

2010-11-08 Thread Robert Goldsmith
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?

Robert

PGP.sig
Description: This is a digitally signed message part
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] runtime generated slot names

2010-11-08 Thread GRolf

I'm always interested in learning, so could you please enlighten me... why 
would you want to have changing names for a fixed slot? It's like having a 
certain function that can have different names. Most of the time, it works the 
other way around (a fixed name with a different functionality).


GRolf


Monday, November 8, 2010, 12:53:55 PM, you 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?

 Robert


___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal