You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Thorsten Scherler <th...@apache.org> on 2005/11/04 16:08:13 UTC

Menus and modules

Hi all,

I was trying to create a custom menu.xsp for a doctype that only
contains a couple of entries, but constantly running into the problem
that through the menu aggregation in the global-sitemap.xmap I get as
well the menus from the modules.

How can I exclude the menus from the modules?

The way I found that are working are:
1) remove the menu.xmap from the modules
2) add your doctype specific stuff in the menus of the modules

Both way meaning that you have to modify core modules and that is not
really nice.

I found as well that one way to generate the menus is from the
publication.xconf. 

Maybe we should extend the match in global-sitemap and the corresponding
xsl to match the doctype and exclude menu entries that have something
like:
<module name="xhtml" exclude="homepage,..."/>

Then we can match in modules2xinclude.xsl 
<xsl:for-each select="module[not(contains($doctype,@exclude))]>
...
</xsl:for-each>

wdyt?
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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


Re: Menus and modules

Posted by Thorsten Scherler <th...@apache.org>.
El vie, 04-11-2005 a las 16:17 +0100, Felix Röthenbacher escribió:
> 
> Thorsten Scherler wrote:
> > Hi all,
> > 
> > I was trying to create a custom menu.xsp for a doctype that only
> > contains a couple of entries, but constantly running into the problem
> > that through the menu aggregation in the global-sitemap.xmap I get as
> > well the menus from the modules.
> > 
> > How can I exclude the menus from the modules?
> 
> You may try to overwrite the menu.xmap or menu.xsp in your publication
> with an empty implementation (fallback mechansim).
> 

Yes, the problem is that the menu is a result from an aggregation.
Meaning that the menu.xmap of the publication is only *one* part of the
resulting menu. The other part is coming from the modules. one need to
override the menu.xmap from the modules as well, or use the modification
of the publication.xconf which seems to be IMO the cleanest solution.


salu2

> hth
> 
> - Felix
> 
> > 
> > The way I found that are working are:
> > 1) remove the menu.xmap from the modules
> > 2) add your doctype specific stuff in the menus of the modules
> > 
> > Both way meaning that you have to modify core modules and that is not
> > really nice.
> > 
> > I found as well that one way to generate the menus is from the
> > publication.xconf. 
> > 
> > Maybe we should extend the match in global-sitemap and the corresponding
> > xsl to match the doctype and exclude menu entries that have something
> > like:
> > <module name="xhtml" exclude="homepage,..."/>
> > 
> > Then we can match in modules2xinclude.xsl 
> > <xsl:for-each select="module[not(contains($doctype,@exclude))]>
> > ...
> > </xsl:for-each>
> > 
> > wdyt?
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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


Re: Menus and modules

Posted by Felix Röthenbacher <fe...@wyona.com>.

Thorsten Scherler wrote:
> Hi all,
> 
> I was trying to create a custom menu.xsp for a doctype that only
> contains a couple of entries, but constantly running into the problem
> that through the menu aggregation in the global-sitemap.xmap I get as
> well the menus from the modules.
> 
> How can I exclude the menus from the modules?

You may try to overwrite the menu.xmap or menu.xsp in your publication
with an empty implementation (fallback mechansim).

hth

- Felix

> 
> The way I found that are working are:
> 1) remove the menu.xmap from the modules
> 2) add your doctype specific stuff in the menus of the modules
> 
> Both way meaning that you have to modify core modules and that is not
> really nice.
> 
> I found as well that one way to generate the menus is from the
> publication.xconf. 
> 
> Maybe we should extend the match in global-sitemap and the corresponding
> xsl to match the doctype and exclude menu entries that have something
> like:
> <module name="xhtml" exclude="homepage,..."/>
> 
> Then we can match in modules2xinclude.xsl 
> <xsl:for-each select="module[not(contains($doctype,@exclude))]>
> ...
> </xsl:for-each>
> 
> wdyt?

-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

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


Re: Menus and modules

Posted by Thorsten Scherler <th...@apache.org>.
I found a even better method.

I activated the fallback for modules menus in publications. Meaning if
you want to override the xhtml module menu then just place a file called
xhtml.xsp in {pub}/conf/menus/.

salu2

El lun, 07-11-2005 a las 13:33 +0100, Thorsten Scherler escribió:
> I attached a patch to
> http://issues.apache.org/bugzilla/show_bug.cgi?id=37380
> which shows what I mean.
> 
> If you think that is a good way then I will commit the patch.
> 
> salu2
> 
> El vie, 04-11-2005 a las 16:08 +0100, Thorsten Scherler escribió:
> > Hi all,
> > 
> > I was trying to create a custom menu.xsp for a doctype that only
> > contains a couple of entries, but constantly running into the problem
> > that through the menu aggregation in the global-sitemap.xmap I get as
> > well the menus from the modules.
> > 
> > How can I exclude the menus from the modules?
> > 
> > The way I found that are working are:
> > 1) remove the menu.xmap from the modules
> > 2) add your doctype specific stuff in the menus of the modules
> > 
> > Both way meaning that you have to modify core modules and that is not
> > really nice.
> > 
> > I found as well that one way to generate the menus is from the
> > publication.xconf. 
> > 
> > Maybe we should extend the match in global-sitemap and the corresponding
> > xsl to match the doctype and exclude menu entries that have something
> > like:
> > <module name="xhtml" exclude="homepage,..."/>
> > 
> > Then we can match in modules2xinclude.xsl 
> > <xsl:for-each select="module[not(contains($doctype,@exclude))]>
> > ...
> > </xsl:for-each>
> > 
> > wdyt?
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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


Re: Menus and modules

Posted by Thorsten Scherler <th...@apache.org>.
I attached a patch to
http://issues.apache.org/bugzilla/show_bug.cgi?id=37380
which shows what I mean.

If you think that is a good way then I will commit the patch.

salu2

El vie, 04-11-2005 a las 16:08 +0100, Thorsten Scherler escribió:
> Hi all,
> 
> I was trying to create a custom menu.xsp for a doctype that only
> contains a couple of entries, but constantly running into the problem
> that through the menu aggregation in the global-sitemap.xmap I get as
> well the menus from the modules.
> 
> How can I exclude the menus from the modules?
> 
> The way I found that are working are:
> 1) remove the menu.xmap from the modules
> 2) add your doctype specific stuff in the menus of the modules
> 
> Both way meaning that you have to modify core modules and that is not
> really nice.
> 
> I found as well that one way to generate the menus is from the
> publication.xconf. 
> 
> Maybe we should extend the match in global-sitemap and the corresponding
> xsl to match the doctype and exclude menu entries that have something
> like:
> <module name="xhtml" exclude="homepage,..."/>
> 
> Then we can match in modules2xinclude.xsl 
> <xsl:for-each select="module[not(contains($doctype,@exclude))]>
> ...
> </xsl:for-each>
> 
> wdyt?
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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