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 8 of 8

Thread: How do you make the category summary text show

  1. #1
    BradC is offline Member
    Join Date
    May 2007
    Posts
    43

    Default How do you make the category summary text show

    If this is the code used to access the Description tab of a category.
    <xsl:value-of select="aspdnsf:EntityPageHeaderDescription($Entit yName, $EntityID)" disable-output-escaping="yes" />

    What is the code for accessing the Summary tab? I tried this, but it didn’t work.
    <xsl:value-of select="aspdnsf:EntityPageHeaderSummary($EntityNam e, $EntityID)" disable-output-escaping="yes" />

  2. #2
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    There is no XSLTExtension to display the Summary field. You could write your own, placing it in the /AspDotNetStorefrontCommon/XSLTExtensions.cs file. Basically, you'd copy the EntityPageHeaderDescription method inside XSLTExtensionBase.cs, and make the appropriate edits.
    Jon Wolthuis

  3. #3
    BradC is offline Member
    Join Date
    May 2007
    Posts
    43

    Default

    Thanks Jon,

    I take it I need to buy the souce code to do that, correct?

  4. #4
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    You'd need the source to modify the AspDotNetCommon project.

    As an alternative, you could modify the showCategory page, using asp.net server-side controls (controls bound to recordsets), rather than (or in addition to) XMLPackages.
    Jon Wolthuis

  5. #5
    estephen is offline Senior Member
    Join Date
    Apr 2006
    Location
    Dallas
    Posts
    208

    Default

    Another alternative is to grab the value directly from the XML. Summary used to not be included in the entity helpers in older versions, but looks like it's being pulled through now, so no SQL mods necessary. It just requires EntityHelpers being set to true in the category XML package.

    You can set the value to a param and then use it wherever you want in your package.

    <!-- SET A PARAM OR USE THE XML VALUE DIRECTLY -->
    <xsl:param name="CategorySummary">
    <xsl:value-of select="aspdnsf:Decode(/root/EntityHelpers/*[name()=$EntityName]/descendant::Entity[EntityID=$EntityID]/Summary)" />
    </xsl:param>

    <!-- TO REFERENCE THE PARAM LATER IN YOUR PACKAGE -->
    <xsl:value-of select="$CategorySummary" disable-output-escaping="yes" />
    />
    Simply set debug="true" to troubleshoot if necessary.

  6. #6
    BradC is offline Member
    Join Date
    May 2007
    Posts
    43

    Default

    Thanks

    Works like a charm.

  7. #7
    JMidd is offline Junior Member
    Join Date
    Oct 2006
    Posts
    19

    Default Works great, but what about sub-categories?

    I would like the summary text for sub-categories to be displayed on the category page. How can this be accomplished? Using your method, only the current category summary is being displayed.

    Thanks!

  8. #8
    Hondo69 is offline Member
    Join Date
    Apr 2011
    Location
    Austin, TX
    Posts
    44

    Default

    This method still works!

    Since this is all new to me I'll add a few notes for others:
    You have to add the first portion of the code at the top of the xml package where the other parameters are set:
    <xslaram name


    Then add the 2nd portion down in the code after you see this appear (</xsl:for-each>). Should be right before this: </xsl:template>
    Version ML 8.0.1.4/8.0.1.4