How to create additional editable areas on a page...

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

How to create additional editable areas on a page...

Post by Darwin Web Design »

Hello
Just wondering how to create a second editable area within the content.  Good example at:

http://www.multiintech.com/index.php?page=andreas01

That page has a third column with heading "third side" - looks like the text in that area could be edited in admin by someone.  I'm guessing it would have something to do with a stylesheet but how do you get that to appear in the editor so the style can be applied to the text?

Thanks
???
cyberman

Re: How to create additional editable areas on a page...

Post by cyberman »

There are two options:

To the first you can download this template from here

http://themes.cmsmadesimple.org/Full_Themes.html

and can look inside.

And to the last you can look at the help for content tag  ;D:
(optional)block - Allows you to have more than one content block per page. When multiple content tags are put on a template, that number of edit boxes will be displayed when the page is edited.
e.g.

Code: Select all

{content block="box_3"}
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: How to create additional editable areas on a page...

Post by Darwin Web Design »

Thank you, I tried the second option, worked first time.  Very simple and opens the doors to many design options now!  Brilliant.

:-*
cyberman

Re: How to create additional editable areas on a page...

Post by cyberman »

Sorry - I forgot an option

http://dev.cmsmadesimple.org/projects/pageblocks/

(only in svn available)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to create additional editable areas on a page...

Post by Dr.CSS »

This is what is in the template...

     
      {content block='thirdblocktitle' oneline='true'}
      {content block='thirdblock'}
   

The h2 'thirdblocktitle' oneline='true' gives you a oneline edit box so you can put any title you want in it with h2 styling in the CSS as in #extras h2 {your style here} so you can style it independant of all other h2s in your page.

And of course the 'thirdblock' gives you a fully editable content box.
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: How to create additional editable areas on a page...

Post by Darwin Web Design »

Would that be the same as using one tag such as:  {content block='thirdblock'} and just relying on your stylesheets to do the H2?  I have set my stylesheets up using contextual selectors (so the H2 for this area is independent of the main page's H2style).  The client would select H1 from the drop down and it would automatically add the style.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to create additional editable areas on a page...

Post by Dr.CSS »

H1 from the drop down is applied to text inside the 'thirdblock' the other, in this case {content block='thirdblocktitle' oneline='true'} sits above the 'thirdblock' so it can be, in my case is styled, independant of anything inside the 'thirdblock'.
WebGirl

Re: How to create additional editable areas on a page...

Post by WebGirl »

This is great Mark!
mark wrote:This is what is in the template...

     
      {content block='thirdblocktitle' oneline='true'}
      {content block='thirdblock'}
   

The h2 'thirdblocktitle' oneline='true' gives you a oneline edit box so you can put any title you want in it with h2 styling in the CSS as in #extras h2 {your style here} so you can style it independant of all other h2s in your page.

And of course the 'thirdblock' gives you a fully editable content box.
I've put  {content block='thirdblocktitle' oneline='true'}  in a site I'm working on, and although it still gives me a whole Content section on the Edit screen, I'm hoping to work out how to make it one line really soon.

This is just what I've been looking for!

WebGirl    UPDATE!  Solved this - see solution below!
Last edited by WebGirl on Sat Oct 21, 2006 11:22 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to create additional editable areas on a page...

Post by Dr.CSS »

If you go to Extensions » Tags click on the word Help across from 'content', newer ver. CMSMS you can click the tag name for help, in help is the parameters for {content} the oneline='true' is supposed to make a single line input textarea like Title: or Menu Text: ...
Pierre M.

Re: How to create additional editable areas on a page...

Post by Pierre M. »

Aussie Gecko wrote: Would that be the same as using one tag such as:  {content block='thirdblock'} and just relying on your stylesheets to do the H2?
May be it could *look* the same for our eyes.
But it may have a *different semantic* for a bot. Bots like structured sites with heading (h1, hn) and content (div, p , span), not just divs.

PM
WebGirl

Re: How to create additional editable areas on a page...

Post by WebGirl »

Hey Mark,
mark wrote: If you go to Extensions » Tags click on the word Help across from 'content', newer ver. CMSMS you can click the tag name for help, in help is the parameters for {content} the oneline='true' is supposed to make a single line input textarea like Title: or Menu Text: ...
Visited the Help page and here's a quick snippet:
What parameters does it take?

    * (optional)block - Allows you to have more than one content block per page. When multiple content tags are put on a template, that number of edit boxes will be displayed when the page is edited.

      Example:

      {content block="Second Content Block"}

      Now, when you edit a page there will a textarea called "Second Content Block".
    * (optional)wysiwyg (true/false) - If set to false, then a wysiwyg will never be used while editing this block. If true, then it acts as normal. Only works when block parameter is used.
    * (optional)oneline (true/false) - If set to true, then only one edit line will be shown while editing this block. If false, then it acts as normal. Only works when block parameter is used.
Tried it again - ok, I solved it!!

I copied your example earlier, and it had single quote marks around the word true, like this oneline='true'

It actually needs two, like this:  oneline="true" [quotation marks, speech marks, inverted commas]

I've also added wysiwyg="false" as the fckeditor is not needed for that one line, as I've already set it up with css in the template. So now it looks like:
      {content block="thirdblocktitle" oneline="true" wysiwyg="false"}
      {content block="thirdblock"}
   
Fantastic!
Thanks for the encouragement Mark!
Last edited by WebGirl on Sat Oct 21, 2006 11:31 pm, edited 1 time in total.
Post Reply

Return to “Layout and Design (CSS & HTML)”