[opencms-dev] Pre-populate contents of editable elements?

Michael Emmerich m.emmerich at alkacon.com
Tue Sep 27 16:28:41 CEST 2005


You could use the "default bodies" for that. When creating a new page, 
you can select a default body whichj puts some content in your new page. 
Normally this is the empty body which will put empty content elements in 
the new page.

How to make your own default body:

Create a new page and fill it with the content you want to use as the 
default content. Save this page and change its type to "plain".
Now copy this converted page into a folder named "default_bodies" in 
your module.
This former page is now used as a default body, you should give it a 
title (because the title will later be shown on the dropdown list when 
creating a new page) and you will be able to use if for creating now pages.

Regards,
Michael Emmerich


Alkacon Software - The OpenCms Experts


Slava Asipenko schrieb:
> Hi All,
> 
>  
> 
> Is there a way to pre-populate contents of editable elements within a 
> template? This is to give content editors better idea on what should go 
> into the editable blocks when they start editing a brand new page.
> 
>  
> 
> I am using something like:
> 
>  
> 
> <cms:template element="body">
> 
> <cms:include element="body" editable="true"/>
> 
> </cms:template>
> 
>  
> 
> And would like to pre-populate body with simple chunk of HTML like 
> “<p>Enter the body of the page here</p>”.
> 
>  
> 
> I know that instead of including an element I can include another file, 
> which will kind of pre-populate the editable block on the page, but then 
> every change to this file will be shared among other pages using the 
> same template. Hope the question makes sense.
> 
>  
> 
> Thanks in advance,
> 
> Slava
> 
>  
> 
> _________________________________
> 
> Slava Asipenko
> 
> Consultant, Technical Architect
> 
> 617.218.6696 sasipenko at molecular.com <mailto:sasipenko at molecular.com>
> 
> Molecular*.*
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list