Welcome to Sign in | Join | Help
Home Forums Photos Downloads

Re: aspdotnetstorefront

  •  10-28-2006, 2:10 PM

    Re: aspdotnetstorefront

    Ok, here's some quick code that I did.

    First, remember that the original skin_1 template.ascx uses the (!ADVANCED_CATEGORY_BROWSE_BOX!), which gets it's formatting from the EntityULList.xslt, which displays everything in a <UL> list (unordered list).  I don't want that format, so I'm going to change it.

    1.  On the template.ascx file in the skin you are using (skin_1 for example), here is my code for the TABLE that displays my category list:

    <table align="Center" border="0" style="width: 168px;">
        (!PLAIN_CATEGORY_LIST!)  <!-- This is the entity object that will repeat our list of Categories -->
       
    <tr>
           
    <td style="height: 12px;"></td<!-- This row is for spacing only -->
        </tr>
    </table>

    2.  Since I dont' want <UL> formatting for my categories, I need to use the PlainEntityList.xslt stylesheet for my custom formatting.  This file is located in the \Web\EntityHelper folder.  Here is my code, which starts around line 78 of the PlainEntityList.xslt file:

    <!-- BEGIN CUSTOM CATEGORY NAVIGATION -->
    <
    xsl:if test="$entity='Category'">  <!-- I added this IF test because this formatting should only apply to the Category list entity -->
    <
    tr>
        <
    td><img height="5" src="skins/Skin_1/images/m17.gif" width="4" align="absMiddle" hspace="3"/>
               <
    a class="ml3">  <!-- I changed the CSS Class to refrence the one from my own stylsheet -->
               <!-- This chunk of code is copied from the original format -->
               <
    xsl:attribute name="href">
               <
    xsl:value-of select="concat($prefix, '-', EntityID, '-', SEName)"/>.aspx
        
    </xsl:attribute>
        <
    xsl:value-of select="$eName"/>
        </
    a>
    <!-- Resume my custom format --> 
        </td>
    </
    tr>
    <
    tr>
        <
    td style="background-color: #F0F0F0; height: 1px;"></td> <!-- Add a row for a horizontal line between Categories -->
    </
    tr>
    </
    xsl:if>
    <!-- Added an IF test to use original formatting for the other 3 entities -->
    <
    xsl:if test="$entity='Section' or $entity='Manufacturer' or $entity='Library'">
    <!-- This is the original code  -->
    <
    a class="Plain{$entity}Link">
        <
    xsl:attribute name="href">
            <
    xsl:value-of select="concat($prefix, '-', EntityID, '-', SEName)"/>.aspx
        </xsl:attribute>
        <
    xsl:value-of select="$eName"/>
    </
    a>
    <
    br />
    </
    xsl:if>
    <!--
    END CUSTOM CATEGORY NAVIGATION -->

    The end result is my custom Category Navigation:

    http://testshop.itechcs.com/

    If you have questions or need help, just let me know.


    William Eaton, MCSE
    iTech Computer Solutions, LLC
    www.itechcs.com
    Filed under:
View Complete Thread
Powered by Community Server, by Telligent Systems