I am new to umbraco and i am using umbraco 4.5.1 version of umbraco. I have a scenario where i have two sites in single umbraco installation and each site have its own blog.i m using the blog4umbraco package to create the blogs. Now the problem is my tags in each of the blog are specific. All tags are being displayed irrespective of the blog group.
Blog group : abc
tags: sample,test,abc1
Blog Group : xyz
tags,testing,progress,carpet
But i am not getting the tags specfic to the blog group. i am getting all the tags being displayed when i use the BlogCatgories Macro.
As you can see from the end of the XSLT you have supplied, the tags are categorised in the database, you have the call
tagsLib:getAllTagsInGroup($category)/tags/tag
So the issue will be modifying the blog package to use a different category dependent upon whether you are in group abc or xyz.
The tags are saved into the DB table cmsTags. The 'group' column is the category, and you will want a two groups, say abc and xyz. From your XSLT, it is looking for a value in the field with an alias of 'category' in the root of the blog for the value of the category. The table cmsTagRelationship shows the nodes that use the tag.
So I would check that 'blogCategory' is being populated in your code, then check that the tags in the cmsTags table has the group populated. It is probably a careful check through the code to check that each is getting the 'group' set correctly.
Can you provide me your code which you have implemented.Can you tel me on which version of the Umbraco have you implemented it. I am using 4.5.2 version of Umbraco and .Net 3.5 frame work.
I am get the Blog Category from the Code but when i check the tag in the Cmstag table the group is being set to default instead of the category i have specified.
That helped.I changed the Document type to the new Datatype and i see the Tags in the CMs table to the specific group mentioned. But when i view the page doesnt show me any tags. It just shows as " ALL(1).
Re blogs tags - because you have only just changed the data type you probably won't have any tagged nodes within the group. If you view your previous blogposts are your tags still showing up ? If so simply republish all your blog posts. If the tags aren't showing up you will have to re-add all your tags to your blog posts and publish each node individually. This should sort that issue out.
Re "GetValueRecursively" - sorry but I have not had any experience with this aspect.
mulitple blogs and tags
Hi
I am new to umbraco and i am using umbraco 4.5.1 version of umbraco. I have a scenario where i have two sites in single umbraco installation and each site have its own blog.i m using the blog4umbraco package to create the blogs. Now the problem is my tags in each of the blog are specific. All tags are being displayed irrespective of the blog group.
Blog group : abc
tags: sample,test,abc1
Blog Group : xyz
tags,testing,progress,carpet
But i am not getting the tags specfic to the blog group. i am getting all the tags being displayed when i use the BlogCatgories Macro.
I have done some research and found a link (http://our.umbraco.org/projects/collaboration/blog-4-umbraco/using-blog-4-umbraco/13884-Multiple-Blogs-and-Tag-Clouds?p=1) and applied the changes mentioned to my Blog Catrgories XSLT and also added the Blog Category to the Blog Document type.
I have refrenced the following link but i was unsuccessful.http://refactored.com.au/blog/2010/10/19/altering-xslt-files-for-blog-categories-with-tags/
Here is my XSLT
<?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:tagsLib="urn:tagsLib"
exclude-result-prefixes="msxml umbraco.library tagsLib">
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="blogRoot" select="$currentPage/ancestor-or-self::Blog"/>
<xsl:variable name="blogRootId" select="$blogRoot/@id"/>
<xsl:variable name="blogCategory" select="$blogRoot/data[@alias='category']"/>
<xsl:template match="/">
<ul>
<xsl:if test="$blogRootId != '' ">
<li class="cat-item"><a href="{umbraco.library:NiceUrl($blogRootId)}">All</a> <span> (<xsl:value-of select="count($currentPage/ancestor-or-self::Blog//ancestor-or-self::BlogPost)"/>)</span></li>
</xsl:if>
<xsl:if test="$blogCategory = ''">
<xsl:call-template name="listCategories">
<xsl:with-param name="category" select="'default'"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="$blogCategory != ''">
<xsl:call-template name="listCategories">
<xsl:with-param name="category" select="$blogCategory"/>
</xsl:call-template>
</xsl:if>
</ul>
</xsl:template>
<xsl:template name="listCategories">
<xsl:param name="category"/>
<xsl:for-each select="tagsLib:getAllTagsInGroup($category)/tags/tag">
<li class="cat-link">
<a href="{umbraco.library:NiceUrl($blogRootId)}?filterby={current()}"><xsl:value-of select="current()"/></a>
</li>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Can any one help me how can i display the tags specific to a blog group or where am i making the mistake.
Thanks
Bobby
Bobby,
As you can see from the end of the XSLT you have supplied, the tags are categorised in the database, you have the call
tagsLib:getAllTagsInGroup($category)/tags/tag
So the issue will be modifying the blog package to use a different category dependent upon whether you are in group abc or xyz.
The tags are saved into the DB table cmsTags. The 'group' column is the category, and you will want a two groups, say abc and xyz. From your XSLT, it is looking for a value in the field with an alias of 'category' in the root of the blog for the value of the category. The table cmsTagRelationship shows the nodes that use the tag.
So I would check that 'blogCategory' is being populated in your code, then check that the tags in the cmsTags table has the group populated. It is probably a careful check through the code to check that each is getting the 'group' set correctly.
Happy hunting
Richard
Hi Bobby
I have successfully implemented this solution for multiple blogs on one site
http://refactored.com.au/blog/2010/10/19/blog-categories-in-blog4umbraco-take-two/ (you reference the first page in your post)
Cheers
Nigel
Hi Nigel,
Can you provide me your code which you have implemented.Can you tel me on which version of the Umbraco have you implemented it. I am using 4.5.2 version of Umbraco and .Net 3.5 frame work.
Thanks
Bobby
Hi Richard,
I am get the Blog Category from the Code but when i check the tag in the Cmstag table the group is being set to default instead of the category i have specified.
Cheers
Bobby
Hi Bobby - on the Blog Post document type did you update the data type to "Blog Tags" (or whatever you named the new datatype) ?
Cheers
Nigel
Hi Nigel,
That helped.I changed the Document type to the new Datatype and i see the Tags in the CMs table to the specific group mentioned. But when i view the page doesnt show me any tags. It just shows as " ALL(1).
Any help.
Cheers
bobby
Hi Nigel,
One more help if you can help me on this issue. when i try to use the code to create the "Blog Tags" datatype in my Visual studio which is refrred in the following link.http://refactored.com.au/blog/2010/10/19/blog-categories-in-blog4umbraco-take-two/. i get an error at "string
category = (
string
)BlogExtensionsLibrary.GetValueRecursively(nodeId.Value,
"category"
);"
stating Umlaut.Umb.Blog.BlogLibrary doesnt contain the defnition for the "GetValueRecursively". Can you help me how what reference am i missing.
Thanks
Bobby
Re blogs tags - because you have only just changed the data type you probably won't have any tagged nodes within the group. If you view your previous blogposts are your tags still showing up ? If so simply republish all your blog posts. If the tags aren't showing up you will have to re-add all your tags to your blog posts and publish each node individually. This should sort that issue out.
Re "GetValueRecursively" - sorry but I have not had any experience with this aspect.
Good luck.
Nigel
is working on a reply...