Internal Link selector not working

matthew.wren's Avatar

matthew.wren

21 Aug, 2013 01:28 PM

I am trying to create a link from our main website to our admissions website. I find the exact page on the other site that I want to link to and submit the changes. I can see that it is linked in the edit menu but when I preview it or ever publish it the link doesn't go where I told it to go. Rather it just reloads the page like there's no link at all. What could be causing this issue?

  1. Support Staff 1 Posted by Tim on 21 Aug, 2013 02:21 PM

    Tim's Avatar

    Hi Matthew,

    A couple of questions for you to see if we can help you narrow this down:

    • What does the HTML source look like for the link just after you've added it in the Edit interface?
    • After you click Submit, click the Preview pane. Then, right-click on the page, select 'this frame' and view the source. What does the HTML source look like for the link here?
    • Are you applying a Block and/or Format to the region in question? If so, can you attach the Format here?

    Thanks

  2. 2 Posted by matthew.wren on 21 Aug, 2013 06:41 PM

    matthew.wren's Avatar

    I have attached 2 screenshots and the frame source. The way this particular page works is that it is a Page that inserted into another page like a block. We call it a widget and it only seems to cause issues when we link it to the admissions subdomain/site. This doesn't happen with link on the same site.

  3. Support Staff 3 Posted by Tim on 26 Aug, 2013 01:49 PM

    Tim's Avatar

    OK, it looks like you may have forgotten to attach the Format that is transforming this content. Can you attach that here? My guess is that it may be using the <path> element when it should really be using the <link> element to output the links.

  4. 4 Posted by matthew.wren on 26 Aug, 2013 07:40 PM

    matthew.wren's Avatar

    Oh my apologies. Is this the correct format? It's the format for the widget.

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output indent="yes" method="html"/>
    
        <xsl:template match="system-data-structure">
            <div class="call-out-links">
                <ul class="menu">
                            <xsl:apply-templates select="call-to-action/link/link"/>
    
    
                </ul>
            </div>
        </xsl:template>
    
    
        <xsl:template match="link">
                        <li>
                        <xsl:if test="(position() = 1) and (name(parent::*) != 'subitems')">
                            <xsl:attribute name="class">first</xsl:attribute>
                        </xsl:if>
                        <xsl:if test="(position() = last()) and (name(parent::*) != 'subitems')">
                            <xsl:attribute name="class">last</xsl:attribute>
                        </xsl:if>
            <xsl:choose>
                <xsl:when test="(link-page/page/path != '/') or (link-external/url != '/' and link-external/url != 'http://') or (link-file/file/path != '/')">
                    <a>
                        <xsl:attribute name="class">
                            <xsl:value-of select="icon"/>
                        </xsl:attribute>
                        <xsl:choose>
                            <xsl:when test="link-page/page/path != '/'">
                                <xsl:attribute name="href">[system-asset]<xsl:value-of select="link-page/page/path"/>[/system-asset]</xsl:attribute>
                            </xsl:when>
                            <xsl:when test="link-file/file/path != '/'">
                                <xsl:attribute name="href">[system-asset]<xsl:value-of select="link-file/file/path"/>[/system-asset]</xsl:attribute>
                                <xsl:attribute name="target">_blank</xsl:attribute>
                                <xsl:attribute name="title">
                                    <xsl:value-of select="link-text"/>- This link will open in a new window.</xsl:attribute>
                            </xsl:when>
                            <xsl:when test="link-external/url != '' and link-external/url != 'http://'">
                                <xsl:attribute name="href">
                                    <xsl:value-of select="link-external/url"/>
                                </xsl:attribute>
                                <xsl:if test="link-external/target = 'New Window'">
                                    <xsl:attribute name="target">_blank</xsl:attribute>
                                    <xsl:attribute name="title">
                                        <xsl:value-of select="link-text"/>- This link will open in a new window.</xsl:attribute>
                                </xsl:if>
                            </xsl:when>
                        </xsl:choose>
                        <strong>
                            <xsl:value-of select="text1"/><xsl:text> </xsl:text>
                        </strong>
                        <xsl:value-of select="text2"/>
                    </a>
                </xsl:when>
                <xsl:otherwise>
                    <strong>
                        <xsl:value-of select="text1"/><xsl:text> </xsl:text>
                    </strong>
                    <xsl:value-of select="text2"/>
                </xsl:otherwise>
            </xsl:choose>
    <xsl:if test="../subitems/link/text1 != ''">
    <ul>
    <xsl:apply-templates select="../subitems/link"/>
    </ul>
    </xsl:if>
    
            </li>
        </xsl:template>
    </xsl:stylesheet>
    
  5. 5 Posted by matthew.wren on 04 Sep, 2013 12:48 PM

    matthew.wren's Avatar

    Is there an update? Is there anything else I'm missing?

  6. 6 Posted by Ryan Griffith on 04 Sep, 2013 02:09 PM

    Ryan Griffith's Avatar

    Thank you for providing your XSLT Format, Matthew.

    As Tim indicated, it looks like you are using asset path as opposed to using the link. The main difference between the two is you need to use link if you are referencing assets that are in another Site, or using the Format within another Site. This will have the site:// prefix that will tell Cascade Server the asset you are linking to is within a specific Site and not the same Site.

    Specifically, you will want to update lines similar to the following:

    <xsl:attribute name="href">[system-asset]<xsl:value-of select="link-page/page/path"/>[/system-asset]</xsl:attribute>
    

    To:

    <xsl:attribute name="href">[system-asset]<xsl:value-of select="link-page/page/link"/>[/system-asset]</xsl:attribute>
    

    Note: you would still want to use the path value when checking if a chooser has a chosen asset (ie looking to see if the value is /).

    Please let me know if you have any questions.

    Thanks!

  7. 7 Posted by matthew.wren on 09 Sep, 2013 05:27 PM

    matthew.wren's Avatar

    That seems to be the problem! Thank you very much!

  8. Support Staff 8 Posted by Tim on 11 Sep, 2013 07:51 PM

    Tim's Avatar

    Glad we could help! Take care, Matthew.

  9. Tim closed this discussion on 11 Sep, 2013 07:51 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac