Making your own Theme using Multiple Layouts: Difference between revisions
(New page: In some cases, you may require multiple layouts for your custom theme. When would this be applicable? An example would be to facilitate a splash page or a special home page. The best way t...) |
mNo edit summary |
||
Line 1: | Line 1: | ||
In some cases, you may require multiple layouts for your custom theme. When would this be applicable? An example would be to facilitate a splash page or a special home page. The best way to do this would be to have a separate layout in your theme, and then simply select that layout for your front | In some cases, you may require multiple layouts for your custom theme. When would this be applicable? An example would be to facilitate a splash page or a special home page. The best way to do this would be to have a separate layout in your theme, and then simply select that layout for your front page. | ||
When available, our included website themes will have additional layouts. If so, you can use these with your pages in the [[Page Settings]] for an existing page, or in the process of [[Creating a New Page | creating a new page]]. You can edit the code for these layouts in the [[Edit Theme Source Code]] section of the [[Toolbar]]. The naming convention for these files is easy to understand - it uses the name of the file as the name of the layout (single_column shows up as 'Single column') for example. | |||
Creating another layout is pretty simple. When you unzip a theme into a directory you should have a default.html file which is your theme file. Simply make a copy of | We'll use an example below which will assume you want to create a separate layout for a splash page. | ||
====How to Create:==== | |||
Creating another layout is pretty simple. When you unzip a theme into a directory you should have a default.html file which is your theme file. As mentioned above, there may be other available layouts for this theme and one of these may be more applicable for your custom layout. Simply make a copy of the file and call it "splash.html". | |||
Make whatever changes you want to your layout following the regular theming guidelines found in the [[Making your own Theme]] area. | Make whatever changes you want to your layout following the regular theming guidelines found in the [[Making your own Theme]] area. | ||
Line 17: | Line 20: | ||
</layouts> | </layouts> | ||
Of course, this code reflects the second layout being named splash.html - the name part should match the filename (but without the .html). You do not need to tell Viviti about your default (default.html) layout, but you can add as many alternative layouts as you want. | Of course, this code reflects the second layout being named ''splash.html'' - the name part should match the filename (but without the .html). You do not need to tell Viviti about your default (default.html) layout, but you can add as many alternative layouts as you want. | ||
====How to Use:==== | |||
When ready, just [[Uploading/Downloading a Theme | upload your custom theme]]. The [[Page Settings]] (either when creating a new page, or editing an existing one) will include a new section called "Layout" where you can select your custom "Splash" layout. | |||
[[Category:Creating Viviti Themes]] | [[Category:Creating Viviti Themes]] |
Revision as of 15:22, 4 August 2009
In some cases, you may require multiple layouts for your custom theme. When would this be applicable? An example would be to facilitate a splash page or a special home page. The best way to do this would be to have a separate layout in your theme, and then simply select that layout for your front page.
When available, our included website themes will have additional layouts. If so, you can use these with your pages in the Page Settings for an existing page, or in the process of creating a new page. You can edit the code for these layouts in the Edit Theme Source Code section of the Toolbar. The naming convention for these files is easy to understand - it uses the name of the file as the name of the layout (single_column shows up as 'Single column') for example.
We'll use an example below which will assume you want to create a separate layout for a splash page.
How to Create:
Creating another layout is pretty simple. When you unzip a theme into a directory you should have a default.html file which is your theme file. As mentioned above, there may be other available layouts for this theme and one of these may be more applicable for your custom layout. Simply make a copy of the file and call it "splash.html".
Make whatever changes you want to your layout following the regular theming guidelines found in the Making your own Theme area.
Basically, just add this between the <author> tag and before the closing </theme>
<layouts> <layout name="splash" label="Splash Page!"></layout> </layouts>
Of course, this code reflects the second layout being named splash.html - the name part should match the filename (but without the .html). You do not need to tell Viviti about your default (default.html) layout, but you can add as many alternative layouts as you want.
How to Use:
When ready, just upload your custom theme. The Page Settings (either when creating a new page, or editing an existing one) will include a new section called "Layout" where you can select your custom "Splash" layout.