I’ve been looking for any info about optimal template construction - I just finished setting up some site and have a filling, that some part of the website are really slow (comparing to other). The stranges thing is that is for almost static pages.
So, because of that, I’ve some questions:
1. First, a template construction:
a)
{exp:weblog:entries}
{embed="includes/header" title="{title}" }
<h2>{title}</h2>
<p>{body}<br />
{embed="includes/sidebar"}<br />
{embed="includes/footer"}<br />
{/exp:weblog:entries}or
b)
{embed="includes/header" title="XXX" }
{exp:weblog:entries}
<h2>{title}</h2>
<p>{body}<br />
{/exp:weblog:entries}<br />
{embed="includes/sidebar"}<br />
{embed="includes/footer"}Any difference? any effect in time of page rendeing? the a. is better for me, cause I can have title, keywords etc. passed to header, but also get some white spaces before <doctype>.
2. dynamic=“on” or url_title=“X” for an exp:weblog:entries tag
With one if faster to render, are there any guidelines to use one instand of other?
And what is the best practice to set it with require_entry=“yes” - just to have en entry I exactly want to have (404 redirect at no_result).
3. is it a good practice to have weblog with only one entry containing all the informations for some section of website (for example “Contact” with phones, adresses, maps etc) and specyfic template group for this section with index that has conditionals to show some custom fields that should be show for current segment_2. Is it can be the problem.
Thanks for any advises.