There is #lookupPath: and friends defined in PRStructure. This allows
you to lookup structures relative to the receiver. If the path starts
with a slash it is always relative to the root. Internally these
methods use PRPathLookup.
Lukas
On Saturday, June 13, 2009, Norbert Hartl <norbert(a)hartl.name> wrote:
On Sat, 2009-06-13 at 07:48 +0200, Lukas Renggli
wrote:
How can I
create a link to another page by specifying the
path? Or something else?
If you use URLs you lose the current session and possibly state.
The right way to do this, is to use objects, e.g.
html anchor
goto: newContext;
with: 'A Pier Link'
where 'newContext' is the description of where you want to go. Create
this new context object from the current one like so:
newContext := self context structure: aStructure
where 'aStructure' is the page you want to go to and 'newContext' is a
temporary variable. Instead of using #structure:, it is also possible
to use #structure:command: or #structure:view: to specify a different
command or view.
Well, I should try to be more clear when asking :) I don't want to loose
the session in between. I want to do it exactly like you wrote here. My
question was towards looking up/finding the structures. It was meant as
"What is the easiest way to find a structure when I now a path?". The
idea (so far) is that I know some of the structure of the site. I want
to do my own component and then I want to link /a/b/c. So I need a way
to lookup /a/b/c as a structure to able to link to it. I imagine the
answer could be PRPathLookup but are there other ways to do?
thanks,
Norbert
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki