Copied to clipboard

Flag this post as spam?

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


  • Black and Yellow 11 posts 31 karma points
    Sep 28, 2011 @ 12:26
    Black and Yellow
    0

    front page not displaying latest blogs

    hello guys, my front page only display blogs located in this root directory (the ones in black)

    this is the front page (look below)

     

    my question is, how can i make all of my blog posts appear in the front page? coz everytime i create blogs, all of them automatically goes into the date folder, like september, 27, 2011. pls help thanks

  • Black and Yellow 11 posts 31 karma points
    Sep 28, 2011 @ 12:27
    Black and Yellow
    0

    PS : also, "website content" ,"ljjl ","gjhg" doesnt show in the frontpage latest blogs because they are placed in current date folder.

  • Tom Hare 49 posts 81 karma points
    Sep 28, 2011 @ 12:38
    Tom Hare
    0

    Could you post your XSLT for where the blog posts are selected and displayed? I imagine the select statement will be something like "/Blog/Post" - adding an extra slash ("/Blog//Post") may fix it...

  • Black and Yellow 11 posts 31 karma points
    Sep 28, 2011 @ 12:40
    Black and Yellow
    0

    @Tom Hare, how can i post XSLT. Sorry im kinda noob, i just installed yesterday

  • Tom Hare 49 posts 81 karma points
    Sep 28, 2011 @ 12:45
    Tom Hare
    0

    Welcome to Umbraco!

    Have you installed a starter pack to get this blog?

  • Black and Yellow 11 posts 31 karma points
    Sep 28, 2011 @ 12:47
    Black and Yellow
    0

    @tom yeah

  • Tom Hare 49 posts 81 karma points
    Sep 28, 2011 @ 12:51
    Tom Hare
    0

    I see. Which one? And it automatically creates the date folders for you?

  • Black and Yellow 11 posts 31 karma points
    Sep 28, 2011 @ 12:55
    Black and Yellow
    0

    i installed starter pack. my theme is the "ghists thingy"

     

    yeah it automatically create date folders :( anywayaround this to disply in front page, i think this is bug

  • Tom Hare 49 posts 81 karma points
    Sep 28, 2011 @ 18:16
    Tom Hare
    0

    Ok I'm not entirely sure which starter pack you are using. In the backend, if you go to Developer>XSLT files, is there a file there that looks like it might be responsible for pulling out blog posts?

  • Black and Yellow 11 posts 31 karma points
    Sep 29, 2011 @ 01:28
    Black and Yellow
    0

    @tom  yeah  , the filename is : umbBusinessFrontpageBlog.xslt

     

    here is the excerpt

     

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [
      <!ENTITY nbsp "&#x00A0;">
    ]>
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary"
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary ">


      <xsl:output method="xml" omit-xml-declaration="yes"/>

      <xsl:param name="currentPage"/>

      <xsl:variable name="numberOfItems">
        <xsl:choose>
          <xsl:when test="/macro/numberOfItems != ''">
            <xsl:value-of select="/macro/numberOfItems"/>
          </xsl:when>
          <xsl:otherwise>5</xsl:otherwise>
        </xsl:choose>
      </xsl:variable>
      <xsl:variable name="excerptLength">
        <xsl:choose>
          <xsl:when test="string(/macro/excerptLength) != ''">
            <xsl:value-of select="/macro/excerptLength"/>
          </xsl:when>
          <xsl:otherwise>100</xsl:otherwise>
        </xsl:choose>
      </xsl:variable>

      <xsl:template match="/">

        <h3>Latest blog posts</h3>
        <ul class="summaryList" id="blogSummary">
          <xsl:for-each select="$currentPage/umbBlog/umbBlogPost [@isDoc and string(umbracoNaviHide) != '1']">
            <xsl:if test="position() &lt;= $numberOfItems">
              <li>
                <h4>
                  <a href="{umbraco.library:NiceUrl(@id)}">
                    <xsl:value-of select="@nodeName"/>
                  </a>
                </h4>
                <p>
                  <xsl:choose>
                    <xsl:when test="string($excerptLength) != '0'">
                      <xsl:value-of select="umbraco.library:TruncateString(umbraco.library:StripHtml(bodyText), number($excerptLength), '...')" disable-output-escaping="yes"/>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:value-of select="bodyText" disable-output-escaping="yes"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </p>
                <small>
                  <xsl:value-of select="umbraco.library:ShortDate(PostDate)"/>
                </small>
              </li>
            </xsl:if>
          </xsl:for-each>
        </ul>

      </xsl:template>

    </xsl:stylesheet>

  • Tom Hare 49 posts 81 karma points
    Sep 29, 2011 @ 11:01
    Tom Hare
    0

    Ok on line 38, the <xsl:for-each> just after <h3>Latest blog posts</h3> - add an extra slash after 'umbBlog'.

    <xsl:for-each select="$currentPage/umbBlog//umbBlogPost [@isDoc and string(umbracoNaviHide) != '1']">

    Any luck?

  • Black and Yellow 11 posts 31 karma points
    Sep 30, 2011 @ 01:15
    Black and Yellow
    0

    no luck

  • Black and Yellow 11 posts 31 karma points
    Sep 30, 2011 @ 01:47
    Black and Yellow
    0

    i just refreshed, and it works :) tnx bro

  • Black and Yellow 11 posts 31 karma points
    Sep 30, 2011 @ 10:23
    Black and Yellow
    0

    @tom, any idea how ot got fixed? how does the double baclskalsh works? explain tnx

  • Tom Hare 49 posts 81 karma points
    Sep 30, 2011 @ 11:23
    Tom Hare
    0

    Nice one. The double slash means it'll look through all child nodes rather than just the immediate child nodes - in this case it was finding the ones that were directly below the Blog folder but not looking through the date folders to find any there. It's a bit confusing that the starter pack should include functionality to automatically include date folders but then not look through those folders in the XSLT - my guess is that this was an oversight and never corrected by the creator.

    Glad I could help.

  • Black and Yellow 11 posts 31 karma points
    Sep 30, 2011 @ 13:14
    Black and Yellow
    0

    tnx tom hare. also the www.flag.co.uk was a great website, it has good design. is that powered by umbraco? i wish i can have that site too^^

  • mark 8 posts 29 karma points
    Nov 29, 2011 @ 22:39
    mark
    0

    Creating a new thread.

  • Chris Burkhardt 2 posts 22 karma points
    Feb 01, 2012 @ 23:41
    Chris Burkhardt
    0

    Thanks for the tip on the xsl, worked for me!

  • 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