Hi Lars,

you have several options, all depend on your preference:

* Use a globalvar that indicates the selected menu, this will be present in every element and thus also your menu.

* You have to be aware of the fact that a datalink is only responsible for bringing the data from an output to the target element, it doesn't tie the input of the destination element to that particular datalink. This means that as long as a value with the same name as your input is present when your embedded element is processed, the embedded element will get it too.

* You can use embed values. When an embedded element is processed, it will receive the current content of its value tag and use that to adapt to the context in which it sits. So using <!--V 'ELEMENT:.ID'-- >menuitem1<!--/V--> will provide "menuitem1" when you call getEmbedValue() from within the embedded element. You can also use BV tags and template hierarchies to override this value.

* You can use request attributes. By using getRequestAttribute and setRequestAttribute, you can freely interchange data in between elements in the same request. Nothing will live longer than the request and it doesn't interact with state storage.

* You can implement a well defined API with your embedding elements and use getEmbeddingElement() to access a method that will for instance provide the current menu item.

* You can access the embedding element's template with getEmbeddingTemplate and by simply deciding upon a variable name, you can easily retrieve it from your embedding element.

That's about it I think.

Best regards,

Geert

On 14 Dec 2005, at 18:45, Lars Grupe wrote:

Hi,

Maybe I want to solve to many things with embedded elements.

I use an embedded element for my main menu. That's fine as long as I
didn't want to highlight the menu item that was selected actually.

I could define an output value that contains the selected menu item.

E.g.:
template.setValue("subsite_url", getExitQueryUrl("home",
                new String[]{"mainMenuSelection", "home"}));

But how can the embedded element get the input value, because there is
no flowlink that directs the output to the input of the embedded
element?

Is there another way to have an element (embedded or not) only for a
menu?
Or should I call a function for filling the menu block in the code of
each element that should display the menu?

Cheers,
Lars
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net



_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to