1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Tag name instead of GUID in Query String

Tag name instead of GUID in Query String

6 posts, 0 answered
  1. Ali
    Ali avatar
    37 posts
    Registered:
    11 Jun 2008
    08 May 2009
    Link to this post
    Currently I am doing some SEO work for a client and one thing I would like to work on is their blog. Right now we are setting up the tags section next to the blog. http://www.habitatsa.org/habitatBlogWithTags.aspx Everything is working fine, I just want to customize the URL output.

    is it possible to to use the actual tag title instead of the GUID?

    Current: http://www.habitatsa.org/habitatBlogWithTags.aspx?Tag=9839e2b9-f844-4e84-88fb-7132b65bc3cc

    What I would like: http://www.habitatsa.org/habitatBlogWithTags.aspx?Tag=Construction

    I am not exactly sure where to even start looking. Any information is appreciate. Thanks!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 May 2009
    Link to this post
    Hello Ali,

    Open TagList control and expand Behavior category. Then set TagItemKey to BlogTagName; TagKeyType to Name

    Programmatically:

    this.TagItemKey = "BlogTagName";  
    this.TagKeyType = TagKeyTypes.Name; 


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Ali
    Ali avatar
    37 posts
    Registered:
    11 Jun 2008
    08 May 2009
    Link to this post
    Ivan this is what my Tag List control looks like. Also can you show a more detailed programatic example, more specifically where to put that code and what file :) thanks.

    -Ali

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 May 2009
    Link to this post
    Hi Ali,

    If you have custom or user control you can use the programmatically approach.

    <%@ Register TagPrefix="blog" Assembly="Telerik.Blogs" Namespace"Telerik.Blogs.WebControls" %> 
     
    <blog:BlogPosts ID="BlogPosts1" runat="server" TagItemKey="BlogTagName" TagKeyType="Name">  
    </blog:BlogPosts> 

    The properties above can be set in the code behind of user control template. Another option is using custom control that inherits from BlogPosts.


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Ali
    Ali avatar
    37 posts
    Registered:
    11 Jun 2008
    12 May 2009
    Link to this post
    Ivan,

    I am using a 3.5 build of SF, not 3.6 so the properties are not in the behavior section and I am using the standard tags and categories control found here

    Is there anyway to get my results using that control? There is no code behind for that control. I apologize for my lack of coding know how. Thanks.

    -Ali
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    14 May 2009
    Link to this post
    Hello Ali,

    There is no code behind of this control( the control is built into assembly). If you want you can override it or use it as I show you in my last post. In version 3.5 TagKeyType property is not implemented. You should upgrade to 3.6.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
6 posts, 0 answered