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

Forums / Designing & Styling / Hyperlink images in content blocks

Hyperlink images in content blocks

3 posts, 0 answered
  1. Steve
    Steve avatar
    13 posts
    Registered:
    29 Apr 2011
    26 Jun 2012
    Link to this post
    I have a site that is almost ready to roll out to a client. I have tried to keep the HTML & CSS so a layman could update content on the site. Yet I am running into issues where the content editor deletes HTML I have entered in HTML view.

    For example, I have some shared content blocks that have two anchor tags. Inside the first anchor, I have an image. In the second anchor I have some text. The first anchor is set to class="imglink", while the second anchor is set to class="link".

    Then there is some short text after the anchors.

    Here is some sample HTML:

    ---------------------------------------------------
    <a href="123" class="imglink">
    <img />
    </a>

    <a href="123" class="link">
    Some text...
    </a>

    <p>Some more text...</p>
    --------------------------------------------------- 

    I just tried to change out the image outside the first anchor while in Design view. It completely removed the outer anchor tag.

    Since non-technical people are slated to use the site, how do I work around issues like this? I could design a user control, but there is not much time available.
  2. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    26 Jun 2012
    Link to this post
    Steve,

    Relying on specific markup to survive an edit is asking for frustrated calls from users. I really only use explicit markup in shared content blocks.

    Seems like a custom widget is probably your best bet. Then you can be certain that what you need as output...will be the output.
  3. Steve
    Steve avatar
    13 posts
    Registered:
    29 Apr 2011
    27 Jun 2012
    Link to this post
    Thanks Tim!

    The one thing that has stopped me from doing a custom widget, besides time, is picking an existing image from the library. Do you have any examples of how to pick an image in a custom widget?

    I do have an example from a reply on another thread. But I am hoping for a simple solution.
3 posts, 0 answered