You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by so...@gmail.com on 2005/05/14 02:39:01 UTC

Re: lenya menus

On 5/13/05, Candide Kemmler wrote:
> Hi,
>  Your answers are very helpful, and lenya does the job very well apparently.
>  Only I'm not too comfortable with HTML, hence I'd like to create a menu
> component with flash. This component would take its input from the
> sitetree.xml document and display the pages in an iframe. I've modified
> xslt/page2xhtml.xsl so the menu and tabs are ommited. Only this stylesheet
> is used both for the authoring process and the generation of "live" pages. 
>  
>  How do I create a separate pipeline that will use an ad hoc stylesheet
> (xslt/page2simple-xhtml.xsl) so I can use it in combination with a flash
> menu component?
> 
> Candide Kemmler

<RANT>As a user, I hate Flash because it removes the ability to "Open
in new window (or tab)".  As a developer, I have yet to find something
Flash does that I cannot handle with HTML and JavaScript. I avoid
IFRAMEs because they do not work in most browsers.

What are you doing with EMBEDs and IFRAMEs if you do not know HTML? 
It is impossible to debug a website, or even work as a modern
developer, without understanding HTML.  There are many, many tutorials
about HTML on the web; take half an hour and learn it.  You will also
need to learn XSL and XML to work with Lenya.  How did you design your
homepage without XSL and HTML?
</RANT>

Flash accepts XML as input.  Create your own flash.xsl in
xslt/navigation to create XML acceptable to your SWF.  You should be
able to do it just by copying menu.xsl and fixing it to show all
nodes.  Remove the section:
    <xsl:when test="descendant-or-self::nav:node[@current = 'true']">
(My "sitemap" function is not posted yet, but has very similar functionality.)

In publication-sitemap.xmap, add a match near the top that returns your XML:
     <map:match pattern="**/flash.xml">
         <map:generate
src="cocoon://navigation/{page-envelope:publication-id}/live/flash/index.xml"/>
        <map:serialize type="xml"/>
     </map:match>

Then pass the URL for that page as a parameter to the Flash EMBED tag:
/{pub}/live/flash.xml

Your Flash will need to check the current URL and decide where it is
in the navigation, assuming you want the menu to change based on which
page is displayed.  (It must be easier to design the page without
Flash than do all this work to lose functionality.)

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org