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
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...
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?
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.
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
PS : also, "website content" ,"ljjl ","gjhg" doesnt show in the frontpage latest blogs because they are placed in current date folder.
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...
@Tom Hare, how can i post XSLT. Sorry im kinda noob, i just installed yesterday
Welcome to Umbraco!
Have you installed a starter pack to get this blog?
@tom yeah
I see. Which one? And it automatically creates the date folders for you?
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
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?
@tom yeah , the filename is : umbBusinessFrontpageBlog.xslt
here is the excerpt
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
]>
<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() <= $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>
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?
no luck
i just refreshed, and it works :) tnx bro
@tom, any idea how ot got fixed? how does the double baclskalsh works? explain tnx
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.
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^^
Creating a new thread.
Thanks for the tip on the xsl, worked for me!
is working on a reply...
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.