Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

how can I add automaticalyy a <span></span>


Go to End


5 Posts   1267 Views

Avatar
servalman

Community Member, 211 Posts

8 October 2009 at 6:58am

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

Avatar
socks

Community Member, 191 Posts

8 October 2009 at 7:46am

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.

Avatar
Greg1

Community Member, 28 Posts

8 October 2009 at 11:27am

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

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

Avatar
servalman

Community Member, 211 Posts

8 October 2009 at 7:45pm

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

Avatar
zenmonkey

Community Member, 545 Posts

9 October 2009 at 12:13pm

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