Hi,
I asked some moons ago about the possibility to have parameterized
component links. I'm not that familiar with pier so my solution to this
might be a bit cheesy.
I wanted to have for multiple reason the ability to do
+mycomponent1|key=value+
to parameterize a component at rendering time. The problem is
that the string is parsed to a link and the link has the parameters.
So the question is how the component gets notice of these. The
last possible call to do I recognized to be
PRViewRenderer>>visitInternalLinkEmbed:
I added the following to it at the beginning
(anObject target isComponent) ifTrue: [
anObject parameters do: [:each|
(self context componentAt: anObject target) propertyAt: each
key put: each value.
]
].
So I just copy all the parameters over to the component. I found
that PRComponent has already properties so I'm using these. Is this
feasible to do? Is there a better way to do? Can this be added to
pier?
I use this for two scenarios:
- advising a component what type it should filter
- to select a child component from a Magritte container (not done, yet)
thanks,
Norbert
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki