Navigation property - TITLE placeholder gets not resolved

This section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Forum rules
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Post Reply
alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Navigation property - TITLE placeholder gets not resolved

Post by alexh225 » Fri Aug 26, 2016 7:02 am

Hello,
not sure if I don't see some important detail or there is a bug.
The issue:
1. Create an extension with navigation tree property like in example within documentation of ExtensionBuilder (page 43)
2. Using the extension in Webbuilder

2.1 Add some navigation items manually works fine as exspected.
2.2 Set the checkbox "Synchronize with Site Manager"
The list get generated (normal HTML list), but the placeholder TITLE as navigation text gets not resolved.
The pages have all a title property not empty.

Does any one else has this behavior?

The XSL template is as following from documentation:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match='/'>
        <xsl:call-template name="menu"/>
    </xsl:template>

    <xsl:template name="menu">
        <ul id="menutree">
            <xsl:apply-templates select="MENU/ITEM"/>
        </ul>
    </xsl:template>

    <xsl:template match="ITEM">
        <li>
            <a href="{URL}" target="{TARGET}"><xsl:value-of select="TITLE"/></a>
            <xsl:if test="ITEM">
                <ul>
                    <xsl:apply-templates select="ITEM"/>
                </ul>
            </xsl:if>
        </li>
    </xsl:template>
</xsl:stylesheet>
Regard

User avatar
Pablo
 
Posts: 19288
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Navigation property - TITLE placeholder gets not resolve

Post by Pablo » Fri Aug 26, 2016 7:40 am

This is the XML I am using:

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 id="menutree">
    <xsl:apply-templates select="MENU/ITEM" />
  </ul>
</xsl:template>

<xsl:template match="ITEM">
  <li>
  <a href="{URL}" target="{TARGET}"><xsl:value-of select="TITLE"/><xsl:value-of select="NAME"/></a>
    <xsl:if test="ITEM">
      <ul>
        <xsl:apply-templates select="ITEM"/>
      </ul>
    </xsl:if>
  </li>
</xsl:template>

</xsl:stylesheet> 

alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Re: Navigation property - TITLE placeholder gets not resolve

Post by alexh225 » Fri Aug 26, 2016 1:54 pm

As far I see the difference is that you are using a value placeholder / variable "NAME"

Code: Select all

<xsl:value-of select="NAME"/></a>
In the documentation of ExtensionBuilder (page 41) are only variables mentioned like
  • TITLE
    URL
    TARGET
    ALT
That means there is another variable available "NAME" and the documentation needs to be slightly updated.

But the variable TITLE is not resolved anymore. I guess it should be the title field in navigation document properties...
The XSL testing tool contains in the testing XML structure also no attribute "NAME" but the variable "TITLE".

Code: Select all

<ITEM>
   <TITLE>Item 1</TITLE>
   <URL>http://XYZ.com</URL>
   <TARGET>_blank</TARGET>
</ITEM>

User avatar
Pablo
 
Posts: 19288
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Navigation property - TITLE placeholder gets not resolve

Post by Pablo » Fri Aug 26, 2016 2:20 pm

TITLE will be used for manually added item. Then the 'title' from the link properties will be used.
When the menu is synchronized with the Site Manager, then the user will not be able to specify a 'title' for the link (because it's automatically generated). That is why I have added the 'NAME" value so it uses the menu name from the page properties.

alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Re: Navigation property - TITLE placeholder gets not resolve

Post by alexh225 » Mon Aug 29, 2016 12:17 pm

OK, that make sense.
Thanks for information
Best Regards
Alex

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest