|
|
How do I create a new Site theme/template? |
| For 6.2.x This assumes you know how to log on as Admin, Turn Admin On, and choose the edit button.
A style template A page template Content.The style template is the static layout of the site. It handles how the head and body is supposed to look, style wise. CSS and other information about the layout of the shell of the site is put here. It is intended to be that the site doesn't change its shell much. If it does change, the expectation is that the style is either replaced or copied and changed. In the <head> tags, the following should likely exist: <head> <title><tmpl_var session.page.title> - <tmpl_var session.setting.companyName></title> <tmpl_var head.tags> </head>The <body> should contain at least: ^PageTitle; ^AdminBar(2); ^Navigation(type or name); ^L(17,"User:<a href=^/;?op=displayAccount>^@;</a>. %Logout%"); <tmpl_var body.content>(The locations and content of the macros should be customized according to the needs of the site). Optionally, add the D (date) macro, c (company) macro, etc.. in appropriate places. The Page Layout template is designed to allow for ease of transitioning between, say, a single-column page to a left-bar or a right bar or a three columns over one type scenario, among others. The Page Layout template also provides the editing icons interface that appears when the "Turn Admin On" is used. Usually, you shouldn't want to change these templates, but they are available if you do.
Content is Wobjects. (Web Objects). Articles, SQL Reports, Dataforms, etc. Each has their own default template to display. This is where the content of the page is provided.
| |
| PS: If you want to drag content under navigation, put the navigation in the page template, above the position_loop, instead of in your style template.
wg-fomATgwyDOTorg | |
| A suggested minimum (If you use this as a style template, you won't get lost/locked out easily): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title><tmpl_var session.page.title> - <tmpl_var session.setting.companyName></title> <tmpl_var head.tags> </head> <body> ^AdminBar(2); <br /> ^PageTitle; ^Navigation(FlexMenu); ^L(17,"User:<a href=^/;?op=displayAccount>^@;</a>. %Logout%"); <tmpl_var body.content> </body> </html> wg-fomATgwyDOTorg | |
| Just a reminder to change Navigation to AssetProxy in 6.3x+.
Also, I've been a proponent of putting Navigation in the Page Template. The problem with this is that it won't show up in renderings where only one asset might be on a page. There is no choose-your-own default page template, and it's of course not recommended to make changes to the default templates because upgrades tend to overwrite them.
| |
| Don't forget to add the Admin Toggle: ^AdminToggle; As it appears to be missing above. I added it as follows: ^L(17,"User:<a href=^/;?op=displayAccount>^@;</a>. %Logout%"); · ^AdminToggle; aewhaleATABS-CompTechDOTcom | |
| AdminToggle is good. I think it is necessary to revamp the default "assumed" stuff in this FAQ. Essentially, AdminBar (I think) was supposed to be the same thing but in 6.x
wg-fomATgwyDOTorg | |
| [Append to This Answer] |
| Next: |
|
| ||||||||