Adding Editable Content
Permalink
Alright, this is probably a silly question. However, I have already made a pure html page. The css being used has already has styling to the p/h3 tags within the document which are styled. IS there a way to keep this formatting, but still have the customization?
Oh, since I had already styled the static pages, I would really like to keep that styling.
Hi Lou
I might be missing the mark here but if you watch this screencast it'll explain exactly how to create a theme and add the path to your style sheet, which will allow to you keep the exact same styling you have on your static html page.
http://www.concrete5.org/help/building_with_concrete5/developers/th...
If i've completely missed the point of what you're trying to achieve then let me know :)
I might be missing the mark here but if you watch this screencast it'll explain exactly how to create a theme and add the path to your style sheet, which will allow to you keep the exact same styling you have on your static html page.
http://www.concrete5.org/help/building_with_concrete5/developers/th...
If i've completely missed the point of what you're trying to achieve then let me know :)
O yeah, I have my style sheet set up with the required concrete5 code and the style is working on the static text.
However, the problem comes when I try to make an actual div editable. I was trying to avoid adding 10 different editable regions in one div by just making the whole div editable. I ran into the problem (at least on the "client side") that the default set is <p>, when I do have <h1>'s in it. So I guess I just dont want to send a spec to a future client telling him with the entire site marked up this is where this goes and it needs to be h1 etc etc.
However, the problem comes when I try to make an actual div editable. I was trying to avoid adding 10 different editable regions in one div by just making the whole div editable. I ran into the problem (at least on the "client side") that the default set is <p>, when I do have <h1>'s in it. So I guess I just dont want to send a spec to a future client telling him with the entire site marked up this is where this goes and it needs to be h1 etc etc.
Once again apologies if i'm stating the obvious here and missing your point!
The wysywig lets you define h1 for the text within a div. So can't you just make the div editable and give it an ID and then use a descendent selector to target the h1 tag? Or set the h1 tag globally?
On my site I've just made a div editable and if i set a h1 title and add some paragraph text below it using the wysywig - the source doesn't wrap the h1 in a p tag so there shoudn't be a problem there. So you only need to make the main div editable really. Is that the issue?
The wysywig lets you define h1 for the text within a div. So can't you just make the div editable and give it an ID and then use a descendent selector to target the h1 tag? Or set the h1 tag globally?
On my site I've just made a div editable and if i set a h1 title and add some paragraph text below it using the wysywig - the source doesn't wrap the h1 in a p tag so there shoudn't be a problem there. So you only need to make the main div editable really. Is that the issue?
Ha Ha. I really do appreciate your patience with me on this issue and trying to help me out.
So I will just show you what I am trying to do.
Lets say I have this in the static page:
I have given style to the div/h1/p tags in my external stylesheet.
Now, if I want the div editable I believe I do this:
I believe what I am trying to do is to eliminate the client side problem I believe would happen. The client goes in and click edit on the sample div, and just inserts his text, which takes on default (paragraph) styling unless he specifies specifically. Could I get around this by doing the following:
Would my proposed solution above take care of what could possibly be a big client side error? Since I already have h1/p styling set up, and making the p/h1's editable, forcing the text being inserted to be h1/p without the client having to specify.?
So I will just show you what I am trying to do.
Lets say I have this in the static page:
<div id="sample"> <h1>Welcome</h1> <p>Some text goes here, and hopefully it looks good</p> </div>
I have given style to the div/h1/p tags in my external stylesheet.
Now, if I want the div editable I believe I do this:
<div id="sample"> <?php $a = new Area('sample');$a->display($c);?> </div>
I believe what I am trying to do is to eliminate the client side problem I believe would happen. The client goes in and click edit on the sample div, and just inserts his text, which takes on default (paragraph) styling unless he specifies specifically. Could I get around this by doing the following:
<div id="sample"> <h1><?php $a = new Area('Sample-h1');$a->display($c);?></h1> <p><?php $a = new Area('Sample-p');$a->display($c);?></p> </div>
Would my proposed solution above take care of what could possibly be a big client side error? Since I already have h1/p styling set up, and making the p/h1's editable, forcing the text being inserted to be h1/p without the client having to specify.?
So you want to have defined areas where the user enters the H1 and P data separately.
I don't think it's beyond any client to understand the distinction between a heading and a normal paragraph.
So i would suggest just using the
<div id="sample"> and have
#simple h1 {styling}
#simple p {styling}
And leave it to the client to decide if they wish to use a header or not. That should work just fine.
Otherwise you could specify precise areas for the heading and the paragraph but this is dumbing it down a bit too much. I've never encountered a web firm that would do this on a general contents page so i really wouldn't bother creating the extra work for yourself.
That said I'm not quite sure how this would be achieved in a simple way so you might want to repost and ask specifically how you can override the default behaviour of the wysywig. :/
I don't think it's beyond any client to understand the distinction between a heading and a normal paragraph.
So i would suggest just using the
<div id="sample"> and have
#simple h1 {styling}
#simple p {styling}
And leave it to the client to decide if they wish to use a header or not. That should work just fine.
Otherwise you could specify precise areas for the heading and the paragraph but this is dumbing it down a bit too much. I've never encountered a web firm that would do this on a general contents page so i really wouldn't bother creating the extra work for yourself.
That said I'm not quite sure how this would be achieved in a simple way so you might want to repost and ask specifically how you can override the default behaviour of the wysywig. :/
Hey I have been hunting around for a similar thing and as this thread was recent Ithought I would wade in and ask/bump here.
I would like me H1 and P to be separate blocks but limit my client to place their content in the relevent boxes.
reason:
My H1 headings are all offset to my paragraph so instead of putting in one div and placing a load of margins and padding I would think it easier (and tidier)to have a h1 [this is heading ONLY] area and a P {this is paragraph text only] area.
Also. It is far better to have only one h1 heading per page (for SEO) if the client gets carried away with hi/her H1's what is to stop them? so in a similar vein can I have a defined [this is ONLY an] H2 area?
I would like me H1 and P to be separate blocks but limit my client to place their content in the relevent boxes.
reason:
My H1 headings are all offset to my paragraph so instead of putting in one div and placing a load of margins and padding I would think it easier (and tidier)to have a h1 [this is heading ONLY] area and a P {this is paragraph text only] area.
Also. It is far better to have only one h1 heading per page (for SEO) if the client gets carried away with hi/her H1's what is to stop them? so in a similar vein can I have a defined [this is ONLY an] H2 area?
Can you clarify what you're trying to achieve.
Do you mean you have styled your page and want to keep that styling ?
Or do you want to know how to make editable areas within your template?
I'm new to C5 too so I'm gonig through the learning curve myself and happy to try help!
Jeb