Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why

Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
Tod Thomas
Journal Template Using Velocity
August 31, 2006 12:16 PM
Answer

Tod Thomas

Rank: Junior Member

Posts: 57

Join Date: June 21, 2006

Recent Posts

Using the Journal portlet I know I can get the values of defined structure elements by using straight velocity variables like $myStruct.getName().

I'm curious to know if this capability extends to the native Liferay values like $user.getGreeting() or $company.getName()? I tried and couldn't get anything returned.

I'm trying to create my own custom template. Right now it seems to be more preferable to use the Journal portlet to create these templates rather than trying to roll my own .war file using a text editor, ant deploy, restart.

What do the Liferay developers use to create templates? Is there a recommendation someone may be willing to provide?

Also, is there a treasure trove of updated Liferay template documentation that includes good velocity examples and a table of available data values that I haven't stumbled over yet?

I'm using 4.1.1.

Thanks - Tod
Joseph Shum
RE: Journal Template Using Velocity
August 31, 2006 12:15 PM
Answer

Joseph Shum

LIFERAY STAFF

Rank: Expert

Posts: 336

Join Date: May 16, 2006

Recent Posts

the docs are being updated with the latest 4.1 content. there will be a section detailing how to create custom templates. stay tuned.

i typically create my custom layouts as WAR file and deploy to the portal.
Tod Thomas
RE: Journal Template Using Velocity
August 31, 2006 12:27 PM
Answer

Tod Thomas

Rank: Junior Member

Posts: 57

Join Date: June 21, 2006

Recent Posts

Joseph Shum:
the docs are being updated with the latest 4.1 content. there will be a section detailing how to create custom templates. stay tuned.


Ok, this is good news.

Joseph Shum:

i typically create my custom layouts as WAR file and deploy to the portal.


I don't mind doing this (I almost prefer it) but there are really a lot of small details that are required to create a professional looking template for the entire portal. This goes beyond my level of knowledge right now and the only alternative was using the Journal.

Do you have any ideas on the $user.getGreeting() or $company.getName() question?

I'm ready to partner up with someone that wants to create a velocity templating tutorial, its about time I gave omething back. You'll just need to put up with my newbie-ness for a time. I'm fairly handy with Velocity.

- Tod
Alexander Chow
RE: Journal Template Using Velocity
August 31, 2006 8:08 PM
Answer

Alexander Chow

LIFERAY STAFF

Rank: Liferay Master

Posts: 518

Join Date: July 19, 2005

Recent Posts

Tod Thomas:
Do you have any ideas on the $user.getGreeting() or $company.getName() question?
Those are not provided through the CMS. Only things associated with the structure are passed through into Velocity.
Tod Thomas
RE: Journal Template Using Velocity
October 6, 2006 6:45 AM
Answer

Tod Thomas

Rank: Junior Member

Posts: 57

Join Date: June 21, 2006

Recent Posts

Joseph,

Any updates on "..detailing how to create custom templates." you can share yet?

Thanks.