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

Forums / General Discussions / New to Sitefinity

New to Sitefinity

4 posts, 0 answered
  1. Ivor
    Ivor avatar
    20 posts
    Registered:
    28 Sep 2010
    28 Sep 2010
    Link to this post
    Hi,

    It's probably a silly question but I'm very new to Sitefinity and can't work out how to create a Generic Content box that is wrapped in my own div?

    Can I just copy the built in Generic Content and alter it? If so, where do I find this?

    Thanks



  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    28 Sep 2010
    Link to this post
    Hello Ivor,

    Here are two options

    1. You can create a ContentPlaceHolder in your master page and wrap it inside a div. Then drop Content block  widget in this holder.

    2. Create  a custom/user control and inside its template declared Content block control.

    <%@ Register TagPrefix="cb" Namespace="Telerik.Sitefinity.Modules.GenericContent.Web.UI" Assembly="Telerik.Sitefinity" %>
     
     
    <div style="background-color:Red">
        <cb:ContentBlock runat="server" ID="test1" />
    </div>

    3. Use CssClass property of the Content block  widget( advanced section). When you set this property the entire control is wrapped inside a div with the specified css.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Ivor
    Ivor avatar
    20 posts
    Registered:
    28 Sep 2010
    28 Sep 2010
    Link to this post
    Ah cool thanks :)

    I need to add multiple boxes to the page so it will need to be either 2 or 3 but I can't seem to get either of them to work...

    If I add a class to the option in advanced it seems to just ignore it, or, if I create a new user control using the code you have provided me it causes a Parser Error.

    Sorry for being a pain.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    28 Sep 2010
    Link to this post
    Hi Ivor,

    Please take a look at the sample video which I attached.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered