Hellow WWB support i have question regarding Syncronize with site manager when adding menu items in my own Menu Extension.
If i understand this correct by looking at eg, your css menu, when Syncronize with site manager this adds the links and the "Menu names" to the menu. It is the Menu names Not the Title that gets added right?
But this is not working in my own Extensions, is there a way to fix this?
Thank you.
How to use Syncronize with site manager in own menu extensio
Forum rules
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
- Patrik iden
-
- Posts: 479
- Joined: Wed Mar 24, 2010 9:07 pm
- Location: Sweden
Re: How to use Syncronize with site manager in own menu exte
The 'TITLE' element in the XML will be replaced by the menu name from the page properties.
- Patrik iden
-
- Posts: 479
- Joined: Wed Mar 24, 2010 9:07 pm
- Location: Sweden
Re: How to use Syncronize with site manager in own menu exte
OK i have this code in the XML, so wy don't i get the menu name in the manu?support wrote:The 'TITLE' element in the XML will be replaced by the menu name from the page properties.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:call-template name="menu" />
</xsl:template>
<xsl:template name="menu">
<ul>
<xsl:apply-templates select="MENU/ITEM" />
</ul>
</xsl:template>
<xsl:template match="ITEM">
<li>
<a href="{URL}"><xsl:value-of select="TITLE"/></a>
<xsl:if test="ITEM">
<ul>
<xsl:apply-templates select="ITEM"/>
</ul>
</xsl:if>
</li>
</xsl:template>
</xsl:stylesheet>
Re: How to use Syncronize with site manager in own menu exte
For the synchronize to work the xml should look like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:call-template name="menu" />
</xsl:template>
<xsl:template name="menu">
<ul>
<xsl:apply-templates select="MENU/ITEM" />
</ul>
</xsl:template>
<xsl:template match="ITEM">
<li>
<a href="{URL}"><xsl:value-of select="NAME"/><xsl:value-of select="TITLE"/></a>
<xsl:if test="ITEM">
<ul>
<xsl:apply-templates select="ITEM"/>
</ul>
</xsl:if>
</li>
</xsl:template>
</xsl:stylesheet>
- Patrik iden
-
- Posts: 479
- Joined: Wed Mar 24, 2010 9:07 pm
- Location: Sweden
Re: How to use Syncronize with site manager in own menu exte
Thank you for this. It works now.
- Patrik iden
-
- Posts: 479
- Joined: Wed Mar 24, 2010 9:07 pm
- Location: Sweden
Re: How to use Syncronize with site manager in own menu exte
Hello i have this HTML menu how should the xsl file look like?
XSL file:
Thank you.
Code: Select all
<!-- Nav -->
<nav class="nav">
<ul class="nav-list">
<li class="nav-item">
<a href="?=home">Home</a>
<ul class="nav-submenu">
<li class="nav-submenu-item">
<a href="?=submenu-1">Submenu item 1</a>
</li>
<li class="nav-submenu-item">
<a href="?=submenu-2">Submenu item 2</a>
</li>
<li class="nav-submenu-item">
<a href="?=submenu-3">Submenu item 3</a>
</li>
<li class="nav-submenu-item">
<a href="?=submenu-4">Submenu item 4</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="?=about">About</a>
</li>
<li class="nav-item">
<a href="?=services">Services</a>
<ul class="nav-submenu">
<li class="nav-submenu-item">
<a href="?=submenu-1">Submenu item 1</a>
</li>
<li class="nav-submenu-item">
<a href="?=submenu-2">Submenu item 2</a>
</li>
<li class="nav-submenu-item">
<a href="?=submenu-3">Submenu item 3</a>
</li>
<li class="nav-submenu-item">
<a href="?=submenu-4">Submenu item 4</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="?=portfolio">Portfolio</a>
</li>
<li class="nav-item">
<a href="?=testimonials">Testimonials</a>
</li>
<li class="nav-item">
<a href="?=contact">Contact</a>
</li>
</ul>
</nav>
<!-- /Nav -->
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:call-template name="menu" />
</xsl:template>
<xsl:template name="menu">
<ul class="nav-list>
<xsl:apply-templates select="MENU/ITEM" />
</ul>
</xsl:template>
<xsl:template match="ITEM">
<li class="nav-item">
<a href="{URL}"><xsl:value-of select="NAME"/><xsl:value-of select="TITLE"/></a>
<xsl:if test="ITEM">
<ul class="nav-submenu">
<li class="nav-submenu-item">
<xsl:apply-templates select="ITEM"/>
</ul>
</xsl:if>
</li>
</li>
</xsl:template>
</xsl:stylesheet>