John Poltorak wrote:
If I create a macro which defines a slot called 'content', is there any
way to have that slot populated by a file with a specific name if it
exists in a folder?
What I'd like to do is create a structure text file, in each of the
folders A B C and have it automatically loaded into a content slot of a
master template whenever the options A B C are selected.
Can I do that, and if so how?
I have spent all day looking at ZPT references and have no idea if what
I'd like to do is possible.
You don't have to involve macros::
<div>I'm a header</div>
This is sample page content
<div>I'm a footer</div>
If 'stxfile' can be aquired, what it renders will be included as page
structure. (You may need to use a different method one the end of the
path to render the object; for Documents, this is 'CookedBody'.)
Otherwise, nothing will be rendered, though you could add a block with
the oposite condition to supply a default action.
If you do not want the effects of acquisition, you may say instead::
since Zope assumes you generally want acquisition.
"Building Websites with Plone"
Enfold Systems, LLC
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -