Foren

Page Template and Pages no relation

Hugo Matinho, geändert vor 12 Jahren.

Page Template and Pages no relation

New Member Beitrag: 1 Beitrittsdatum: 26.04.11 Neueste Beiträge
Hello Everyone,
i was trying to create a custom portlet using vaadin that would get the related page template from a page, but there's no association whatsoever between the page and the page template.

If I understand correctly the page uses the page template only on creation of a page ?

if i check the database, there's a column with the value layoutPrototypeId in the Layout table, which I believe should link to the layoutPrototypeId from the LayoutPrototype table, so by database design we should be able to associate the page to a page template, which would enable us to create specific pages for a determined template and also enable us to change the template and the page update accordingly, but that's not what liferay is doing.

The status at the moment is that when i create a new page, it allows me to select one of the created page templates, and that is used to layout the components in the page, but when I edit a page there's no option to change the page template, and in the database all pages return 0 as layoutPrototypeId.

So did i understand correctly the way page template works is only used on page creation ?

Is it a bug ? should liferay team update the layout table to include the correct page template id upon page creation or should we extend the class and implement ourselves when developing a component that uses the layout and layout template ?
I think it would be a great feature that liferay could manage and associate page templates to pages not only during creation but also during the edition of the page.

Could someone help me out here with associating the page to a page template upon creation without extending the core classes ?
Bakann DY, geändert vor 12 Jahren.

RE: Page Template and Pages no relation

New Member Beiträge: 5 Beitrittsdatum: 16.10.09 Neueste Beiträge
The interface Layout has a method setLayoutPrototypeId inherited from LayoutModel.
When I use it and update the layout, the layoutPrototypeId remains 0 in the LAYOUT table.
Does someone know how to use it, please?