Displaying Blog content from Blog4Umbraco on Home page
Ive implemented B4U into a site I am building and am about to create blog entries. However, I dont really need a full page to be the "blog" page as the package is setup. I simply want to have a panel on my home page display all of the blog entries.
However, the BlogListPosts.xslt that is used on the BLOG page cant be used on other pages due to how it is gathering data in the For-Each statements:
I would like all of the info from each blog entry to be viewable on another page within a certain section (div) on my home page ( but I am sure the solution would apply to any page).
I have found a solution to show Title of each entry and then a link back to the original blog entry but this really isnt what I want. I tried a handful of ways to modify the BlogListPosts.xslt to pull this info from another page but being new to Umbraco/xslt, I didnt have any success. Thanks for your help.
Ok, then you should be able to modify the BlogListPosts.xslt to use a variable containing the source of your blogposts instead of $currentPage.
try making a variable called "root", which you assign the value of the id of the root of your blogentries.
Like this: <xsl:variable name="root" select="umbraco.library:GetXmlNodeById('nodeid')" /> - you can see the nodeid by holding the cursor over the node, ind the content tree and view the lower left corner. Or you can simply just click on the node and go go the "properties" section to see the node id.
Now, instead of $currentPage you should be able to use $root in the xslt file.
For this to work you also need to go to the macro section and find modify it so that it can be inserted into the rich text editor.
Then you should be able to insert the macro in any of your pages and be able to view the blog-posts.
Displaying Blog content from Blog4Umbraco on Home page
Ive implemented B4U into a site I am building and am about to create blog entries. However, I dont really need a full page to be the "blog" page as the package is setup. I simply want to have a panel on my home page display all of the blog entries.
However, the BlogListPosts.xslt that is used on the BLOG page cant be used on other pages due to how it is gathering data in the For-Each statements:
------------
<xsl:for-each select="$currentPage/ancestor-or-self::Blog//BlogPost">
and
<xsl:for-each select="$currentPage/ancestor-or-self::Blog//BlogPost [contains(Exslt.ExsltStrings:lowercase(./tags), Exslt.ExsltStrings:lowercase($filter))]">
------------
Has anyone found a way to display the blog entries on another page successfully? Thanks.
Hi MHH311
Let me get this right...
You just want the blogposts to be viewable on another page and not the blog itself? Or do you want both?
/Jan
Jan-
I would like all of the info from each blog entry to be viewable on another page within a certain section (div) on my home page ( but I am sure the solution would apply to any page).
I have found a solution to show Title of each entry and then a link back to the original blog entry but this really isnt what I want. I tried a handful of ways to modify the BlogListPosts.xslt to pull this info from another page but being new to Umbraco/xslt, I didnt have any success. Thanks for your help.
Hi MHH311
Ok, then you should be able to modify the BlogListPosts.xslt to use a variable containing the source of your blogposts instead of $currentPage.
try making a variable called "root", which you assign the value of the id of the root of your blogentries.
Like this: <xsl:variable name="root" select="umbraco.library:GetXmlNodeById('nodeid')" /> - you can see the nodeid by holding the cursor over the node, ind the content tree and view the lower left corner. Or you can simply just click on the node and go go the "properties" section to see the node id.
Now, instead of $currentPage you should be able to use $root in the xslt file.
For this to work you also need to go to the macro section and find modify it so that it can be inserted into the rich text editor.
Then you should be able to insert the macro in any of your pages and be able to view the blog-posts.
I hope the above explanation makes sense.
Otherwise just let us know :)
/Jan
Jan- your recommendation worked, thanks for the help.
is working on a reply...