In terms of:
- Speed
- Required processing (which will influence speed)
- Following standards
Which of the following two methods will be better?
I want to create a general page layout, however, the frontpage will look different from the normal look and feel.
Method 1
Creating a normal page.tpl.php file but with the following code in it:
.....
<body>
<?php if (isFront()) {
// lots of stuff for the frontpage
}
else
{
// lots of stuff for the other pages
}
?>
</body>
Method 2
Creat two distinct pages, namely page.tpl.php and front.tpl.php. Code will be duplicated, but the frontpage and other pages will each have their own dedicated file.