Administrators Nabeel Posted March 11, 2010 Administrators Report Share Posted March 11, 2010 I've implemented an additional layout format for 2.1, called 'layout.tpl'. When this file is in a skin's folder, it will use that, instead of the header.tpl and footer.tpl files. It'll look like this: <html> <head> <title><?php echo $page_title ?></title> <?php echo $page_htmlhead; ?> </head> <body> <?php $page_htmlreq; ?> <div id="container"> <div id="content"> <?php echo $page_content; ?> </div> </div> </body> </html> As you can see, this is the entire HTML page, with: <?php echo $page_content;?> Placed where the content will show up, and the normal additions to the template. The default skin has been changed to this. But it might help some people with skinning, since it's a bit easier to visualize how it comes together. The old method (header.tpl/footer.tpl) will still work, but if it sees the 'layout.tpl' file, it will use that. Any other ideas? Quote Link to comment Share on other sites More sharing options...
Tom Posted March 11, 2010 Report Share Posted March 11, 2010 Looks like a great idea for people who are new to the whole skinning thing. I would still use header/footer myself as it seems to be that slight bit easier if you want to use columned layouts etc. Actually never mind. Didn't think about it properly. Looks fun. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 11, 2010 Author Administrators Report Share Posted March 11, 2010 Looks like a great idea for people who are new to the whole skinning thing. I would still use header/footer myself as it seems to be that slight bit easier if you want to use columned layouts etc. Actually never mind. Didn't think about it properly. Looks fun. Yeah, it's just the header.tpl/footer.tpl squashed into one file. Quote Link to comment Share on other sites More sharing options...
liberie Posted March 11, 2010 Report Share Posted March 11, 2010 I've implemented an additional layout format for 2.1, called 'layout.tpl'. When this file is in a skin's folder, it will use that, instead of the header.tpl and footer.tpl files. It'll look like this: <html> <head> <title><?php echo $page_title ?></title> <?php echo $page_htmlhead; ?> </head> <body> <?php $page_htmlreq; ?> <div id="container"> <div id="content"> <?php echo $page_content; ?> </div> </div> </body> </html> As you can see, this is the entire HTML page, with: <?php echo $page_content;?> Placed where the content will show up, and the normal additions to the template. The default skin has been changed to this. But it might help some people with skinning, since it's a bit easier to visualize how it comes together. The old method (header.tpl/footer.tpl) will still work, but if it sees the 'layout.tpl' file, it will use that. Any other ideas? LGTM Quote Link to comment Share on other sites More sharing options...
Guest Brian Posted March 12, 2010 Report Share Posted March 12, 2010 Good idea. I like it . Cant Wait! Quote Link to comment Share on other sites More sharing options...
Toyuko Posted March 14, 2010 Report Share Posted March 14, 2010 Simple-I like it. Quote Link to comment Share on other sites More sharing options...
Guest N402KC Posted March 15, 2010 Report Share Posted March 15, 2010 Well on the current version, i had to make links for all my images. (<?php ECHO SITE_URL ?>/lib/skins/simual/images/logo.jpg) in order for them to work. On the new version will we have to do thaT? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 15, 2010 Author Administrators Report Share Posted March 15, 2010 Since 2.0 (the last release) there's been these functions: url('module/etc/...'); // Same as index.php/site/etc/... actionurl('module/etc/...'); // same as action.php/site/etc/... fileurl('lib/skins/etc/'); // same as site_url/lib/skins It automatically adds in the SITE_URL, et. It was detailed in the changelo/upgrade guide Quote Link to comment Share on other sites More sharing options...
Guest N402KC Posted March 15, 2010 Report Share Posted March 15, 2010 Oh Ok Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.