Copied to clipboard

Flag this post as spam?

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


  • kylepauljohnson 70 posts 108 karma points
    Jul 04, 2010 @ 20:37
    kylepauljohnson
    0

    XSLT Issues with Blog4Umbraco

    I am busy trying to solve issues i am having with the XSLT's for Blog4Umbraco some of them are rendering but it seems that the xpaths are not fetching data.  For example I have the archive list set to:

    <div class="widget">
    <ul class="archive">
    <xsl:for-each select="$currentPage/ancestor-or-self::node [@nodeTypeAlias = 'Blog']/node [@nodeTypeAlias = 'DateFolder']">
    <xsl:sort select="@nodeName" data-type="number" order="descending" />
    <xsl:for-each select="./node [@nodeTypeAlias = 'DateFolder']">
    <xsl:sort select="@nodeName" data-type="number" order="descending" />
    <li class="month">
    <xsl:variable name="monthname" select="umbraco.library:FormatDateTime(concat(./../@nodeName,'-',@nodeName,'-11T10:24:46'),'MMMM yyyy')" />
    <a href="{umbraco.library:NiceUrl(@id)}">
    <xsl:value-of select="$monthname"/>
    </a>&nbsp;<span>
    (<xsl:value-of select="count(.//node [@nodeTypeAlias = 'BlogPost'])"/>)
    </span>
    </li>
    </xsl:for-each>
    </xsl:for-each>
    </ul>
    </div>

    The div, and the UL are written, but no LI's are being written.  I do have one blog post published, but it seems that the default XSLT isn't picking up the node.

    Umbraco Version: 4.5.0
    Blog4Umbraco Version: 2.0.26

  • kylepauljohnson 70 posts 108 karma points
    Jul 04, 2010 @ 20:41
    kylepauljohnson
    0

    Forgot to add...

    This is happening to several XSLT's.  Others are not rendering and displaying errors.

    Error parsing XSLT file: \xslt\BlogLatestComments.xslt
    
    Error parsing XSLT file: \xslt\BlogCategories.xslt
    
  • Benjamin Howarth 305 posts 771 karma points c-trib
    Jul 04, 2010 @ 23:29
    Benjamin Howarth
    0

    Hi Kyle,

    Are you running Umbraco 4.0.x or 4.5?

    If you're running 4.5 the XML schema has changed as per this wiki article so your XSLT should be as follows:

    <div class="widget">
      <ul class="archive">
        <xsl:for-each select="$currentPage/ancestor-or-self::Blog/DateFolder">
          <xsl:sort select="@nodeName" data-type="number" order="descending" />
            <xsl:for-each select="./DateFolder">
              <xsl:sort select="@nodeName" data-type="number" order="descending" />
              <li class="month">
                <xsl:variable name="monthname" select="umbraco.library:FormatDateTime(concat(./../@nodeName,'-',@nodeName,'-11T10:24:46'),'MMMM yyyy')" />
                <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="$monthname"/></a>
                <span>(<xsl:value-of select="count(.//BlogPost)"/>)</span>
              </li>
            </xsl:for-each>
          </xsl:for-each>
        </ul>
    </div>

    Best,

    Benjamin

  • kylepauljohnson 70 posts 108 karma points
    Jul 05, 2010 @ 00:42
    kylepauljohnson
    0

    I have installed 4.5 yes.  That helped a lot. Do you have any insights in to the others?  Is this documented somewhere?

  • Benjamin Howarth 305 posts 771 karma points c-trib
    Jul 05, 2010 @ 00:54
    Benjamin Howarth
    0

    Hi Kyle,

    I've just updated my post above, apologies. The wiki article describing the new XML schema can be found here.

    Best,

    Benjamin

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies