Tuesday 13 February 2007 9:18:16 am
Hi Massimiliano My two ideas did not work out anyway... I think detecting whether the flash navigation is loaded is not a big problem. You should be able to send either an referrer with a link. If that does not work, submit a small form to a custom module instead of an http request, when someone clicks on the link. Your custom module checks the sent information, sets a session variable that the navigation is there for the link submitted in the form and redirects to the requested module/view. The problem I see is loading an additional frameset (when the navi is not there) and loading the requested url in the correct frame. This is where I failed with my ideas :-( Nevertheless here my ideas, maybe they can give you a hint for a working solution.
The first idea:
You have two pagelayouts. One just for the flash navigation. The other one contains two areas, one with two iframes for the navi and the content, the other part just the content itself.
Now your flash navigation sends some info with the link to tell eZ that it is there. If it is there, the second part of the pagelayout is used, as this will display the content to the iframe targeted by the link. If the information is not there, the part of the pagelayout with the two iframes is loaded, which loads the iframe with the flash navi and the iframe with the content.
Unfortunately this does not work at all - you would need to process module result twice because when the pagelayout is loaded with two iframes, it needs to request the content for the lower iframe again. Another major problem with this approach is what happens when you click on links within the content iframe. I haven' tried it but I fear that you will get another frameset with the navi and the content within the content, which is of course unusable.
The second idea: Use apache mod_rewrite and an frameset page outside of eZ. The flash navigation again needs to be able to send an referrer or some other information that can be used by mod_rewrite, but is not part of the link. Also, as said before, the navi needs to be able to send links to defined target which is the content frame.
Mod_rewrite checks whether the link was sent from the flash navigation. If yes, the request is forwarded to EZ which returns the requested page in the layout for the content frame. As the link was targeted to the content frame, it appears correctly. If the link was not sent from navigation we assume that the navi is not loaded and forward the request to the external frameset. This loads the navigation frame and forwards the requested url to the content frame which loads the content supplied by eZ. Here you have the same problem with frames within frames, so no joy... Good luck Claudia
|