CMS content variables / get data base content

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CMS content variables / get data base content

Robert Gan
hey,

i want to use the cms functionality and am mostly satisfied. I prefer to manage the content with the backend CMS future without touching the code to make live easier for my employees (html editor).

So I am wondering now if there is the possiblity to use variables within the CMS / content screens of the admin backend. I mean like using a groovy file and within the html editor I add variables like ${...}

Or do I have to use only FTL in this case? i.ex. I often have to show the company adress, and want my employess not to type it each time. I want them to use just the variable for it.

Hope you understand what I mean.

Thanks in advance

robert
Reply | Threaded
Open this post in threaded view
|

Re: CMS content variables / get data base content

Anil Patel-3
Robert,
Yes, you can do this and you will be using FTL. The ftl template will be stored in ElectronicText table, Set dataTemplateTypeId=FTL for your dataResource. For reference look at data in "specialpurpose/ofbizwebsite/data/OfbizData.xml" file.

Regards
Anil Patel



On Dec 18, 2012, at 7:48 PM, "Robert G." <[hidden email]> wrote:

> hey,
>
> i want to use the cms functionality and am mostly satisfied. I prefer to
> manage the content with the backend CMS future without touching the code to
> make live easier for my employees (html editor).
>
> So I am wondering now if there is the possiblity to use variables within the
> CMS / content screens of the admin backend. I mean like using a groovy file
> and within the html editor I add variables like ${...}
>
> Or do I have to use only FTL in this case? i.ex. I often have to show the
> company adress, and want my employess not to type it each time. I want them
> to use just the variable for it.
>
> Hope you understand what I mean.
>
> Thanks in advance
>
> robert
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/CMS-content-variables-get-data-base-content-tp4638364.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: CMS content variables / get data base content

Robert Gan
thanks for your fast reply :)

I see, so I can use FTL Syntac within:

<textData>
<![CDATA[
]]>
</textData>

Can I use also the Syntax within the HTML / WYSIWYG Editor in backend as well?

because the things between the above named tag overwrite my database content in case that I reload the XML file, so I dont want to write anything between these tags.

please let me know.
Reply | Threaded
Open this post in threaded view
|

Re: CMS content variables / get data base content

Robert Gan
ha, just tested it --> it works..great, thanks! :)