Re: [Phplib-users] Problem repeating nested templates
Brought to you by:
nhruby,
richardarcher
From: Layne W. <la...@of...> - 2001-12-31 15:04:11
|
> How, using the current template.inc, can you repetitively use the > same template, expanded with different values, into other templates? > > Example: > > <!-- BEGIN top --> > (item) > <!-- END top --> > > <!-- BEGIN item --> > (links) > <!-- END item --> > > <!-- BEGIN block --> > (links) > <!-- END block --> > > <!-- BEGIN links --> > {link} > <!-- END BLOG_LINKS_BLOCK --> > > And I want "top" containing multiple instances of "item" and > "block", with each of those sub-blocks containing a different > "links". The obvious approach doesn't work because the first time I > parse "links" to then build a block or item the template is lost so > I can't come back later with a new value for "link" and gen a new > value to later shove in a new block or item. > > Am I missing something? Although you are parseing the "links" block into several places, you need to name the target variables separately ({some_links}, {some_other_links}, etc). Layne Weathers Ifworld Inc. |