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

Thread: Calling a Topic from a section

  1. #1
    cshetler@gospikes.com is offline Junior Member
    Join Date
    Aug 2012
    Posts
    9

    Default Calling a Topic from a section

    Is it possible to call a topic from a section name, rather than linking to a section I need a section name to point to a topic.

    If I wrap an href around a category name, this does the trick (below)...

    Code:
    <a href="t-mytopicname.aspx">Categtory Name</a>
    but creating the same type of href in a section name generates a url like below

    HTML Code:
    http://site.com/s-1000004-a-hreft-mytopicnameaspxmy-section-namea.aspx
    Thanks in advance!

  2. #2
    ccoddington is offline Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Default

    Where are you doing this?
    Chris Coddington
    Aydus Consulting
    Office: 800-419-0391 x303
    Direct: 213-785-8201
    Mobile: 818-675-1066
    Skype: Chris.Coddington
    chris@aydus.com
    www.aydus.com

  3. #3
    cshetler@gospikes.com is offline Junior Member
    Join Date
    Aug 2012
    Posts
    9

    Default

    Quote Originally Posted by ccoddington View Post
    Where are you doing this?
    Currently site is not "published" but the question specifically applies to MS 9.3.

  4. #4
    ccoddington is offline Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Default

    Sorry, is this in a package or in a particular page?
    Chris Coddington
    Aydus Consulting
    Office: 800-419-0391 x303
    Direct: 213-785-8201
    Mobile: 818-675-1066
    Skype: Chris.Coddington
    chris@aydus.com
    www.aydus.com

  5. #5
    cshetler@gospikes.com is offline Junior Member
    Join Date
    Aug 2012
    Posts
    9

    Default

    Quote Originally Posted by ccoddington View Post
    Sorry, is this in a package or in a particular page?
    I basically need this functionality to work from either navigating the departments from the menus or from the section links generated.
    In looking deeper it appears that the "normal" href links generated work as expected, the issue is the hrefs related to the section images.

    I'm using the entity.grid.xml.config package to display all of my sections and the url for the images in the packages appears to be causing the issue.
    I'm just not sure what to change to fix it. I don't want to "break" the functionality for normal calls to section pages.

    Code:
    entity.grid.xml.config
    ...
    <td align="center" width="{concat(round(100 div number($SubcatGridCols)),'%')}">
         <a href="{$URL}">
              <xsl:value-of select="aspdnsf:LookupEntityImage(EntityID, $EntityName, 'icon', 0, $AltText)" disable-output-escaping="yes" />
         </a>
         <br/>
         <a href="{$URL}">
              <xsl:value-of select="$scName" disable-output-escaping="yes"/>
         </a>
    </td>

  6. #6
    ccoddington is offline Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Default

    I think I get the problem now... So you are putting HTML into the section name in the admin, is that right?
    Chris Coddington
    Aydus Consulting
    Office: 800-419-0391 x303
    Direct: 213-785-8201
    Mobile: 818-675-1066
    Skype: Chris.Coddington
    chris@aydus.com
    www.aydus.com

  7. #7
    cshetler@gospikes.com is offline Junior Member
    Join Date
    Aug 2012
    Posts
    9

    Default

    Quote Originally Posted by ccoddington View Post
    I think I get the problem now... So you are putting HTML into the section name in the admin, is that right?
    Yep. I couldn't think of an easier way to get the functionality I required. There are times when we will need to call a topic from either a section or category link rather than to the showsection or showcategory pages themselves.

  8. #8
    ccoddington is offline Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Default

    Are you better with JS or XSLT?
    Chris Coddington
    Aydus Consulting
    Office: 800-419-0391 x303
    Direct: 213-785-8201
    Mobile: 818-675-1066
    Skype: Chris.Coddington
    chris@aydus.com
    www.aydus.com

  9. #9
    cshetler@gospikes.com is offline Junior Member
    Join Date
    Aug 2012
    Posts
    9

    Default

    Quote Originally Posted by ccoddington View Post
    Are you better with JS or XSLT?
    I think I'd rather use XSLT
    Chris S.
    ADNSF - MS 9.3

  10. #10
    ccoddington is offline Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Default

    Is this for navigation (either the top menu or the left nav)?
    Chris Coddington
    Aydus Consulting
    Office: 800-419-0391 x303
    Direct: 213-785-8201
    Mobile: 818-675-1066
    Skype: Chris.Coddington
    chris@aydus.com
    www.aydus.com

  11. #11
    cshetler@gospikes.com is offline Junior Member
    Join Date
    Aug 2012
    Posts
    9

    Default

    Quote Originally Posted by ccoddington View Post
    Is this for navigation (either the top menu or the left nav)?
    Currently the navigation works, the only issue I have found is in the ADNSF generated image links - the text links are fine.
    Chris S.
    ADNSF - MS 9.3

  12. #12
    ccoddington is offline Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Default

    So not knowing your setup, from the default entity.grid.xml.config package that comes with the 9.3.1.0, you would do this

    http://screencast.com/t/hjjcm3njf8d
    Chris Coddington
    Aydus Consulting
    Office: 800-419-0391 x303
    Direct: 213-785-8201
    Mobile: 818-675-1066
    Skype: Chris.Coddington
    chris@aydus.com
    www.aydus.com

  13. #13
    cshetler@gospikes.com is offline Junior Member
    Join Date
    Aug 2012
    Posts
    9

    Default

    Quote Originally Posted by ccoddington View Post
    So not knowing your setup, from the default entity.grid.xml.config package that comes with the 9.3.1.0, you would do this

    http://screencast.com/t/hjjcm3njf8d
    Just in case anyone else is looking for similar functionality down the road, we implemented the following code in several of our Entity XML packages to achieve our desired results, we can now embed href's in entity names and they will be handled correctly.

    Code:
    <xsl:choose>
        <xsl:when test="contains($scName,'href') = 'true'">
            <a href="{substring-before(substring-after($scName,'href=&quot;'),'&quot;>')}">
                <xsl:value-of select="aspdnsf:LookupEntityImage(EntityID, $EntityName, 'icon', 0, $AltText)" disable-output-escaping="yes" />
            </a>
        </xsl:when>
        <xsl:otherwise>
            <a href="{$URL}">
                <xsl:value-of select="aspdnsf:LookupEntityImage(EntityID, $EntityName, 'icon', 0, $AltText)" disable-output-escaping="yes" />
            </a>	
        </xsl:otherwise>				
    </xsl:choose>
    Thanks for the help Chris!
    Chris S.
    ADNSF - MS 9.3