For version 2.1 - new layout file

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?

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.

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.

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:

<?php echo $page_title ?> <?php echo $page_htmlhead; ?> <?php $page_htmlreq; ?>
<?php echo $page_content; ?>

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

Simple-I like it.

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