Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • James Deadman 1 post 71 karma points
    Nov 24, 2015 @ 12:28
    James Deadman
    0

    Data type content not pulling to page

    Hiya,

    I am quite new to Umbraco but am editing a site as a favour to a friend and not sure where I am going wrong.

    I need to create some social media icons that can be edited from the Settings page.

    I have created the Xslt file and in turn the Macro. Included the fields into the Settings page which are visible and working. However when I enter values into the fields, they do not show on the site.

    Only the variables aren't showing, so I know the template is pulling the macro information just not the values of the fields.

    Here is my code:

    <xsl:variable name="settingsNodeId" select="1046" />
    <xsl:variable name="tw" select="umbraco.library:GetXmlNodeById($settingsNodeId)/twitterURL" />
    <xsl:variable name="fb" select="umbraco.library:GetXmlNodeById($settingsNodeId)/faceBookURL" />
    
    <xsl:template match="/">
    <xsl:if test="$fb != '' or $tw != ''">
        <div class="social-block">
          <h4 style="color:black;">Follow The Exchange</h4>
            <xsl:if test="$fb != ''">
                <a href="{$fb}" title="Find us on Facebook" class="fb">Facebook</a>    
            </xsl:if>
            <xsl:if test="$tw != ''">
                <a href="{$tw}" title="Follow us on Twitter" class="tw">Twitter</a>
            </xsl:if>
        </div>
    </xsl:if>
    

    Any help would be massively appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft