Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gwowen Fu
Is it possible to set Template ID when it is created?
February 24, 2012 11:59 AM
Answer

Gwowen Fu

Rank: Expert

Posts: 253

Join Date: December 27, 2010

Recent Posts

Hi,

When I create a template in Web Content screen. I'd like to set Template ID to something like "HelloWorldTemplate" instead of number 12345.
Is this possible in 6.1 CE?

Another question is if I have a template with name "HelloWorldTemplate", is it possible to get template by name from my portlet?

Regards,
Gwowen
Gwowen Fu
RE: Is it possible to set Template ID when it is created?
February 27, 2012 10:17 AM
Answer

Gwowen Fu

Rank: Expert

Posts: 253

Join Date: December 27, 2010

Recent Posts

Can any Liferay master confirm that it is possible to set custom ID for JournalTemplate or not?
Gwowen Fu
RE: Is it possible to set Template ID when it is created?
January 8, 2013 10:01 AM
Answer

Gwowen Fu

Rank: Expert

Posts: 253

Join Date: December 27, 2010

Recent Posts

Problem solved. emoticon

Add the following line in portal-ext.properties to allow custom name for article, structure, and template names.

journal.article.force.autogenerate.id=false
journal.structure.force.autogenerate.id=false
journal.template.force.autogenerate.id=false
Sagar A Vyas
RE: Is it possible to set Template ID when it is created?
February 27, 2012 9:20 PM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 655

Join Date: April 17, 2009

Recent Posts

Hi ,

Another question is if I have a template with name "HelloWorldTemplate", is it possible to get template by name from my portlet?


Of course you can do it, since you have solved the problem its good practice to send solution on post , It will help to other people emoticon

Thanks,
Sagar Vyas