Brent,
You could use the jsp templating module and allow the content developers
to use jsp tags or you could modify the jsp templating a bit and convert
your own tag language to the actual jsp tags that would have to be at
that place. The jsp then only has to be refreshed once a content dev
changes the actual node.
Ruben
Brent McArthur wrote:
G’day Magnolians,
It’s been a while since I’ve emailed to this list. I’ve been busy
demoing and presenting Magnolia to some of our clients. The feedback
is awesome.
A question that has come up a number of times from our clients is with
respect to blending text retrieved from a database with text entered
via a content author. Similar to the way the forms module works in
that confirmation emails and thank you pages can embed content
submitted through the form in emails or pages (see
http://demoauthor.magnolia-cms.com/demo-project/service/contact.html,
Edit Form Settings -> Confirmation E-Mail).
I wanted to get some feedback on the best way to do this. In our case,
we’ll always be using JSP templates – not Freemaker. Imagine I have a
magnolia based website where the customers can log into. After logging
in we want to display a page that contains a welcome paragraph such as:
<p>Hi ${nickname} – welcome back. You last logged in on
${lastLoginDate} and your account balance is currently
${accountBalance}.</p>
The key is we want the welcome message to be content managed – not
hardcoded. Basically we want to expose a bunch of pre-determined
variables that content authors can embed where ever they like inside
text based paragraphs. Assume these variables are previously loaded
into HTTP session scope through some filter.
How would you do this?
I can think of two ways but maybe there are easier ways:
1. Write our own JSP Custom Tag that replaces the ${xx} found in
content with corresponding session variables prior to writing the
content to the response stream.
2. Write our own base paragraph renderer that does the same as the
custom tag.
Is there any easier way?
Hopefully I’ve explained myself well enough.
Cheers,
Brent**
------------------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------