ASPX templates
Version 4.x > ASPX templates > problems with tagcloud webpart... View modes: 
User avatar
Member
Member
rookie07 - 7/24/2009 3:26:45 AM
   
problems with tagcloud webpart...
hi,

on my homepage i've put the tag cloud in the masterpage:

<uc1:TagCloud runat="server" ID="TagCloud1" TagGroupName="Content" ShowForDocumentTypes="CMS.MenuItem;foxlx.angebote;foxlx.bestseller;foxlx.links;foxlx.news;foxlx.top3seller;foxlx.vnavi" 
AliasPath="/Home/%" QueryStringName="tagid" DocumentListURL="/Search" TagSeparator=" "
ZeroRowsText="Es wurden noch keine Schlagwöter vergeben..." />


that means the tags of the content of the documenttypes: CMS.MenuItem;foxlx.angebote;foxlx.bestseller;foxlx.links;foxlx.news;foxlx.top3seller;foxlx.vnav
should be shown, if one tag has been clicked it should open a new site (search.aspx) where i've put the repeater control:

<uc1:Repeater ID="CMSRepeaterTagCloudResults" runat="server" ClassNames="CMS.MenuItem;foxlx.angebote;foxlx.bestseller;foxlx.links;foxlx.news;foxlx.top3seller;foxlx.vnavi"
TransformationName="Community.Transformations.DocumentList"
HideControlForZeroRows="true" OrderBy="DocumentName" Path="/Home/%" />


everything works fine but i seems the repeater isn't responsive to the selected tag, it always shows the same selection or nothing. so what did i do wrong?

isn't it possible to create a global tagcloud (documentation says no)? i would like to put the tag cloud on any site in order to make navigation a little bit easier?

how can i do this?

thank you!

User avatar
Member
Member
rookie07 - 7/24/2009 6:52:42 AM
   
RE:problems with tagcloud webpart...
ok, sorry - my fault.

you can manipulate it with the code behind (change the aliaspath, path and query the db)

finally i've got it...

thanks!

User avatar
Member
Member
kentico_pavelk - 7/24/2009 7:07:43 AM
   
RE:problems with tagcloud webpart...
Hi

You may need to specify WhereCondition in your repeater. Please find it below.

({%tagid|(toint)%} = 0 AND '{%tagname%}'='')
OR (DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID = {%tagid|(toint)%}))
OR (DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID IN (SELECT TagID FROM CMS_Tag WHERE TagName = '{%tagname%}' AND TagGroupID = {%groupid|(toint)%})))


You can read more about this in our Developer's guide.
http://devnet.kentico.com/docs/devguide/index.html?using_the_tag_cloud_web_part.htm


Best Regards,
Pavel Knotek