More in this section

Forums / Developing with Sitefinity / Blogs cloud font 300%

Blogs cloud font 300%

4 posts, 0 answered
  1. Jake Dacillo
    Jake Dacillo avatar
    12 posts
    Registered:
    13 Oct 2009
    11 Dec 2009
    Link to this post
    I use set font size to 10 for tagCloudItem but because the automatic generate have the style for 300% which make the font so big. How can I remove it. The list font is working fine.

    <a class="tagCloudItem" id="ctl00_rightmaincontent_TagsList1_ctl00_tagsRepeaterCloud_ctl01_tagLink" style="font-size: 300%;" href="/blogs.aspx?BlogTagID=f670757a-c5ac-4ebc-9786-9ce583c1836a">

    Thank you in advance.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Dec 2009
    Link to this post
    Hi Jake Dacillo,

    Thank you for using our services.

    You can download the external templates archive and modify the control template for the TagsList control. The control template is located in ~/Sitefinity/ControlTemplates/Generic_Content/TagsList,ascx. You can do something similar to this to set your styles for the tags cloud:
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            tagsRepeaterCloud.ItemDataBound += new RepeaterItemEventHandler(tagsRepeaterCloud_ItemDataBound);
        }
     
        void tagsRepeaterCloud_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            Telerik.Cms.Engine.ITag tag = e.Item.DataItem as Telerik.Cms.Engine.ITag;
            HyperLink tagLink = e.Item.FindControl("tagLink") as HyperLink;
            if (tagLink != null)
            { if (tag.ContentsTagged>5)
                tagLink.CssClass="MyClass5";   
            
        }
    </script>



    Then you have to map the template with the following view settings in your controls config file:
    <!--Provides user interface for displaying the list of tags for the content items.-->
    <viewSettings hostType="Telerik.Cms.Engine.WebControls.Tags.TagsList" layoutTemplatePath="~/Sitefinity/ControlTemplates/Generic_Content/TagsList.ascx" />

    You can find more information about external templates in this article: How to map a view to an external template, in Sitefinity 3.6 or later?

     Regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Jake Dacillo
    Jake Dacillo avatar
    12 posts
    Registered:
    13 Oct 2009
    16 Dec 2009
    Link to this post

    I followed the steps

    Content Telerik.Sitefinity.Configuration.ControlsConfig.xml

    <?xml version="1.0" encoding="utf-8" ?> 
    <controlsConfig> 
      <viewMap> 
        <!-- Insert a new news item template --> 
        <viewSettings hostType="Telerik.Cms.Engine.WebControls.Tags.TagsList" 
    layoutTemplatePath="~/Sitefinity/ControlTemplates/Generic_Content/TagsList.ascx"> 
        </viewSettings> 
      </viewMap> 
    </controlsConfig> 

    Tagslist.ascx file
    I added AAAAAAAAAAA before teh taclounditem -- but doesn't seem to display.

    <%@ Control Language="C#" %>
    <h3>
        <asp:Literal ID="controlTitle" runat="server"></asp:Literal>
    </h3>
    <p>
        <asp:Literal ID="lblDisplayAs" runat="server" Text='<%$Resources:DisplayAs %>'></asp:Literal> :
        <asp:LinkButton ID="displayCloudLink" runat="server" Text='<%$Resources:Cloud %>'></asp:LinkButton> |
        <asp:LinkButton ID="displayListLink" runat="server" Text='<%$Resources:List %>'></asp:LinkButton>
    </p>

    <asp:Repeater ID="tagsRepeaterCloud" runat="server">
        <HeaderTemplate><ul class="tagCloud"></HeaderTemplate>
        <ItemTemplate>
           AAAAAAAAAAA<li><asp:HyperLink ID="tagLink" runat="server" CssClass="tagCloudItem"></asp:HyperLink></li>
        </ItemTemplate>
        <FooterTemplate></ul></FooterTemplate>
    </asp:Repeater>

    <asp:Repeater ID="tagsRepeaterList" runat="server">
        <HeaderTemplate><ul></HeaderTemplate>
        <ItemTemplate>
            <li>
                <asp:HyperLink ID="tagLink" runat="server"></asp:HyperLink>
                (<asp:Label ID="taggedContentCount" runat="server"></asp:Label>)
            </li>
        </ItemTemplate>
        <FooterTemplate></ul></FooterTemplate>
    </asp:Repeater>

     
    Can you help?

  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    17 Dec 2009
    Link to this post
    Hi Jake Dacillo,

    Did you restart the website when you have made the changes to the controls config file?  You can also set the layottemplate path of this control by its control editor through the CMS UI. Give the URL to the LayoutTemplatePath property in Appearance section.

    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered