Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Scott Hanson
Trouble creating new layout template in existing theme
October 26, 2012 11:14 AM
Answer

Scott Hanson

Rank: New Member

Posts: 12

Join Date: September 5, 2012

Recent Posts

I can't seem to get my custom page layout (100%, 100%, 65%/35%, 100%) to show up in Liferay. Any suggestions?

I am building a theme based on ZOE Healthcare, and Liferay is pulling it in accordingly. In the theme, under docroot _diffs/layoutpl/custom/ there were two "custom" layouts already. I created a third. I'm not seeing any of these and still only seeing the typical options when logged into Liferay, "Freeform, 2-col, etc".

Any suggestions on what more I need to do to pull in a new layout within an already functioning theme?

Thanks!
Maarten van Heiningen
RE: Trouble creating new layout template in existing theme
October 26, 2012 11:57 AM
Answer

Maarten van Heiningen

Rank: Regular Member

Posts: 172

Join Date: February 5, 2009

Recent Posts

Hi Scott,

These layouts are set within the theme look-and-feel xml file and thus only are available to select when you use the theme on a site or page.
For your own new layout you should also include this in the look-and-feel file in your theme.

Best
Maarten
Scott Hanson
RE: Trouble creating new layout template in existing theme
October 26, 2012 12:48 PM
Answer

Scott Hanson

Rank: New Member

Posts: 12

Join Date: September 5, 2012

Recent Posts

Maarten van Heiningen:
Hi Scott,

These layouts are set within the theme look-and-feel xml file and thus only are available to select when you use the theme on a site or page.
For your own new layout you should also include this in the look-and-feel file in your theme.

Best
Maarten


Thanks so much for your reply--though I don't understand your answer?

I do see the XML file -- there's very little in it but it does have my theme name in it. What do I need to add to the XML for the layout to show up?

Thanks again!
Anonymous
RE: Trouble creating new layout template in existing theme
October 26, 2012 1:04 PM
Answer

Anonymous

In the liferay-look-and-feel.xml for the healthcare theme there is this section below.

 1<layout-templates>
 2            <custom>
 3                <layout-template id="1-2-3-columns" name="1-2-3 Columns Layout">
 4                    <template-path>/layouttpl/custom/1-2-3-columns-layouttpl/1_2_3_columns.tpl</template-path>
 5                    <wap-template-path>/layouttpl/custom/1-2-3-columns-layouttpl/1_2_3_columns.tpl</wap-template-path>
 6                    <thumbnail-path>/layouttpl/custom/1-2-3-columns-layouttpl/1_2_3_columns.png</thumbnail-path>
 7                </layout-template>
 8                <layout-template id="2-1-2-4-columns" name="2-1-2-4 Columns Layout">
 9                    <template-path>/layouttpl/custom/2-1-2-4-columns-layouttpl/2_1_2_4_columns.tpl</template-path>
10                    <wap-template-path>/layouttpl/custom/2-1-2-4-columns-layouttpl/2_1_2_4_columns.tpl</wap-template-path>
11                    <thumbnail-path>/layouttpl/custom/2-1-2-4-columns-layouttpl/2_1_2_4_columns.png</thumbnail-path>
12                </layout-template>
13            </custom>
14        </layout-templates>


so just copy another layout-template section I reference the layouts that are in your theme
Scott Hanson
RE: Trouble creating new layout template in existing theme
October 26, 2012 1:36 PM
Answer

Scott Hanson

Rank: New Member

Posts: 12

Join Date: September 5, 2012

Recent Posts

Interesting--my copy of that file didn't have anything for <layout-templates>. Anyway I added my code with my new layout and it seems to be working now--so thank you!

This will bring me to my next question ... emoticon