Hi Arjen, > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Arjen Zwerver > Sent: vrijdag 25 juli 2008 13:18 > To: [email protected] > Subject: [HippoCMS-dev] Dynamic menu's in backend using Xopus > > Hi, > > I'm busy building templates to display the xml of a document > through Xopus. Everything works fine now (thanks Jasha). I > can edit and save the documents. > > The thing is that the menu's in the frontend, build with the > Hippo Site Toolkit (HST), are generated dynamically with the > help of dasl-queries. > It fetches the dirs and documents in a specific dir and links > to them. > But I also want to have dynamic menu's in the backend. > > My idea was to generate an xml-file using the HST. I did this > and in the xsl file I added: > <ul> > <xsl:for-each > select="document('http://adres/topmenu.jsp')/menu/menuitem"> > <li> > <a href="#this"> > <xsl:value-of select="caption"/> > </a> > </li> > </xsl:for-each> > </ul> > > This works fine in IE, but not in FF because of a limitation > of Xopus in FF. > > My question was if there's any other way to generate the > dynamic menu's in the backend, maybe without the use of the HST?
You're querying your frontend to get a list of menu items? Sounds like that can be done from the backend. You'll have to know some basics about Cocoon [1] to do it. Create a pipeline in your extensions that executes the dasl query and transforms it into a nice list. To speed up the performance, change the output into the html you want in your menu. Then you can change the external document call into the URI of your pipeline. Off-topic: if you keep it like you have. xsl:apply-templates is better than xsl:for-each. Although for-each is easier, it's slower because it needs the whole XML tree in memory. [1] http://cocoon.apache.org/2.1 Jasha Joachimsthal www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 ******************************************** Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: MarkMail: http://hippocms-dev.markmail.org Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
