On Fri, 2009-09-25 at 18:22 +0200, Lukas Renggli wrote:
> > The
concrete problem motivating these questions is that I want to
> > display a list of files whose name match a certain pattern in a
certain
> > directory. The pattern and the
directory could be hardcoded, but
it
would be more interesting if they were editable in the
web.
You can do this with something like this:
+value:children|link|target=/path/to/directory|select=File+
Let's see if I
understand.
Do parameters like |foo=bar get translated into method calls foo:
"bar"?
And |foo=bar|with=blah becomes sends of foo:
"bar" and then with:
"blah", rather than foo: "bar" with: "blah"?
No method calls. Value links (PRValueLink) are just a special kind of
link that embeds some dynamically created content, similar to a
component but without state. See the documentation at
<http://bit.ly/294VHv>.
Yes, I saw that. But I don't understand what
happens with the
parameters. Are you saying the +value...+ above will work without any
new code on my part? Somehow I have to create the children to iterate
over, don't I?
These are directed to my component, not the
children? But the thing
with +value:children...+ is a PRPage, not my component, so that
won't
work. So maybe my component should subclass
PRPage?
PRPage is a model object.
WAComponent is a view object.
See <http://www.piercms.com/doc> for details.