Jump to:

23483 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » how can I add automaticalyy a <span></span>

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 943 Views
  • servalman
    Avatar
    Community Member
    211 Posts

    how can I add automaticalyy a <span></span> Link to this post

    Hi

    Last question for today :

    Is there a way of adding automaticalyy <span></span> to a the h1 h2 h3 etc. styles when using the editor
    I can't have my client write them in html

    Thank you

  • socks
    Avatar
    Community Member
    190 Posts

    Re: how can I add automaticalyy a <span></span> Link to this post

    Not that I know of. Can you elaborate why you would want to do <span><h1>Header</h1></span>, that doesn't make sense to me.

    If you want <h1>Header <span>(other info)</span></h1>, then you should make a class for the Style drop-down menu.

  • Greg1
    Avatar
    Community Member
    28 Posts

    Re: how can I add automaticalyy a <span></span> Link to this post

    Can you give us an example of the HTML output that you want?

    As the previous poster said it doesn't really make sense.

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: how can I add automaticalyy a <span></span> Link to this post

    Hi

    I'm trying to be clearer :

    Yes it is more like this :
    <h1>Header <span>(other info)</span></h1>

    I need to Place a CSS background image horizontally right on an h2, for this image to be right after the h2 I need span.

    here is a tutorial showing this technique :http://veerle.duoh.com/blog/comments/placing_a_css_background_image_horizontally_right_on_an_h2_using_a_span_ele/

    I'm very intereted in the way you can make a class for the Style drop-down menu.

    Thanks a lot

    T

  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Re: how can I add automaticalyy a <span></span> Link to this post

    Since this is a styling issue and not a content issue I'd just call on the power of jQuery. http://jquery.com

    Its a great javascript library that can handle all sorts of style-y bells and whistles. Barring that, you could alway add a check box or drop down field to your page type and a function that checks if its clicked/selected then the template will render the span. But like I said since this seems to be style and not a content issue I'd go the jQuery route

    943 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.