Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JForum
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
JForum
Regarding $ variables
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
I want to define some $ variables, which can be used in the template files similar to ${post.id}, ${post.subject} etc.
Lets call it ${post.mysubject} and let it have the same value as ${post.subject}. How to create such variables?
[originally posted on jforum.net by sharathciddu]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
To define a variable in the template, use
<#assign myVar = "myValue"/>
You can't create variables using the dot notation, because Freemarker will think that that it's a call to some object's instance.
Rafael
[originally posted on jforum.net by Rafael Steil]
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Why Java ?
foreach
Character escaping
Everything works except "Preview" any problem on previewMessage() function?
能使用中文吗
More...