Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 6 of 6

Thread: Left Toolbar Menu Help

  1. #1
    Amy P is offline Member
    Join Date
    Jun 2007
    Posts
    50

    Default Left Toolbar Menu Help

    Has anybody rearranged how the Manufacturers are displayed in the left toolbar? We have a long list of manufacturers and would like to only list about 10 of them and then have a link that says "More..." that takes you to the manufacturer page if clicked on to display the rest of the manufacturers. I am not used to editing XML packages and have no idea how I would even start to try and do this. If anybody has done anything similar to this and doesn't mind sharing the XML package they created to do this it would be greatly appreciated. Thanks in advance for any help provided!

  2. #2
    Amy P is offline Member
    Join Date
    Jun 2007
    Posts
    50

    Default

    Is there anybody else that has this same problem?

  3. #3
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    Try using this modified rev.manufacturers.xml.config file (located in skins/skin_#/XmlPaclages)
    Code:
    <?xml version="1.0" standalone="yes" ?>
    <!-- ###################################################################################################### -->
    <!-- Copyright AspDotNetStorefront.com, 1995-2006.  All Rights Reserved.					                -->
    <!-- http://www.aspdotnetstorefront.com														                -->
    <!-- For details on this license please visit  the product homepage at the URL above.		                -->
    <!-- THE ABOVE NOTICE MUST REMAIN INTACT.                                                                   -->
    <!-- $Header: /v6.1/Web/XmlPackages/rev.manufacturers.xml.config 1     12/30/05 2:33p Administrator $	   -->
    <!-- ###################################################################################################### -->
    <package version="2.1" displayname="Manufacturers" debug="false" includeentityhelper="true">
        <PackageTransform>
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
                <xsl:output method="html" omit-xml-declaration="yes"/>
    
                <xsl:param name="AncestorID">
                    <xsl:for-each select="/root/EntityHelpers/Manufacturer//Entity[EntityID = $ManufacturerID]">
                        <xsl:value-of select="ancestor::*/EntityID"/>
                    </xsl:for-each>
                </xsl:param>
    
                <xsl:param name="ParentID">
                    <xsl:for-each select="/root/EntityHelpers/Manufacturer//Entity[EntityID = $ManufacturerID]">
                        <xsl:value-of select="parent::*/EntityID"/>
                    </xsl:for-each>
                </xsl:param>
    
                <xsl:param name="ManufacturerID">
                    <xsl:choose>
                        <xsl:when test="/root/QueryString/manufacturerid">
                            <xsl:value-of select="/root/QueryString/manufacturerid"/>
                        </xsl:when>
                        <xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
                <xsl:template match="/">
                  <xsl:element name="ul">
                    <xsl:attribute name="class">
                      <![CDATA[tame]]>
                    </xsl:attribute>
    
                    <xsl:for-each select="/root/EntityHelpers/Manufacturer/Entity">
    
                      <xsl:sort select="DisplayOrder"/>
                      <xsl:sort select="Name"/>
                      <xsl:sort select="EntityID"/>
                      
                      <xsl:if test="position() &lt; 11">
                        <xsl:element name="li">
                          <xsl:element name="a">
                            <xsl:attribute name="href">
                              <xsl:value-of select="concat('m-',EntityID,'-',SEName,'.aspx')"/>
                            </xsl:attribute>
                            <xsl:value-of select="aspdnsf:GetMLValue(Name)"/>
                          </xsl:element>
                        </xsl:element>
    
                        <xsl:if test="((EntityID = $ManufacturerID) or (EntityID = $AncestorID))">
    
                          <xsl:for-each select="descendant::Entity[(descendant::ParentEntityID = $ManufacturerID) or (descendant::EntityID = $ManufacturerID)]">
                            <xsl:sort select="DisplayOrder"/>
                            <xsl:sort select="Name"/>
                            <xsl:sort select="EntityID"/>
                            <xsl:variable name="EntityID" select="EntityID"/>
    
                            <xsl:element name="li">
                              <xsl:call-template name="Space">
                                <xsl:with-param name="count" select="count(ancestor::*/Entity[(descendant::EntityID = $EntityID)]) - 1"/>
                              </xsl:call-template>
                              <span class="catMark">&gt;&gt;</span>*
                              <xsl:element name="a">
                                <xsl:attribute name="href">
                                  <xsl:value-of select="concat('m-',EntityID,'-',SEName,'.aspx')"/>
                                </xsl:attribute>
                                <xsl:value-of select="Name"/>
                              </xsl:element>
                            </xsl:element>
    
                          </xsl:for-each>
    
                        </xsl:if>
                      </xsl:if>
                        </xsl:for-each>
                    <xsl:if test="count(/root/EntityHelpers/Manufacturer/Entity) &gt; 10">
                        <br/><a href="manufacturers.aspx">More...</a>
                    </xsl:if>
                    </xsl:element>
                  
                </xsl:template>
    
                <xsl:template name="Space">
                    <xsl:param name="count" select="1"/>
                    <xsl:if test="$count > 0">
                        <xsl:text>*</xsl:text>
                        <xsl:call-template name="Space">
                            <xsl:with-param name="count" select="$count - 1"/>
                        </xsl:call-template>
                    </xsl:if>
                </xsl:template>
    
            </xsl:stylesheet>
        </PackageTransform>
    </package>

  4. #4
    Amy P is offline Member
    Join Date
    Jun 2007
    Posts
    50

    Default

    It worked great! Thank you so much!

  5. #5
    charleswidmore is offline Junior Member
    Join Date
    May 2010
    Posts
    2

    Default Ml 9

    Does anyone know how to do this in ML 9?

  6. #6
    aahmadi3 is offline Member
    Join Date
    Nov 2010
    Posts
    64

    Default

    Yes ML9 please!