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

Forums / General Discussions / Changing CssClass Field in Advanced Mode to a Drop Down List

Changing CssClass Field in Advanced Mode to a Drop Down List

3 posts, 0 answered
  1. Jamie
    Jamie avatar
    14 posts
    Registered:
    25 Mar 2011
    19 Oct 2011
    Link to this post
    Hi there,

    Is there a way to change the 'CssClass' text field in advanced mode (of a content block) to a drop down list of pre-defined css class names?

    My client is requesting this so they can change the background color and style of a content block quickly without knowing much html etc etc.

    At first I added a custom css drop down list on the editor itself (using the toolsfile.xml method) but it doesn't seem to work efficiently.

    If there is no way to directly change the cssclass property to a dropdown list, then could you let me know of an alternative way to allow them to do this.

    It needs to be so that it changes the div class wrapper tag.

    Many thanks,
    Jamie
  2. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    21 Oct 2011
    Link to this post
    Jamie,

    The Telerik guys may correct me in this, but you may have to create a custom Content block control to achieve something like that. Until, the Telerik guys come back to you with a better idea, here is a very bad idea for now.

    In the CssClass field you can define multiple CSS classes with spaces inbetween. Specify all the classes that you need but spell correctly just the one that you currently need to be applied. That way, when you want to change the CSS class, you just mis-spell the current one and correct the spelling on the one you want. You can have a "1" at the end or something. How is that for a very bad idea?

    I wish they had a poll for the worst ideas, this one would definitely win. By the way, I have not tried it at home myself, so no guarantees.

    Thanks,
    Andrei
  3. Jamie
    Jamie avatar
    14 posts
    Registered:
    25 Mar 2011
    21 Oct 2011
    Link to this post
    Thanks Andrei,

    Usually I would use this idea to solve my solution if I were the sole person needing to edit this field, but because non techy clients will be needing to edit this I can just see it getting all confusing for them and I'll end up having to change it anyway :)

    I am interested in your idea about adding a custom content block though. Telerik, is this the correct way to go? and if so, could you provide a sample on how to do this please?

    Many thanks,
    Jamie
3 posts, 0 answered