On Tue 28 Sep 2010 09:06, Robin Getz pondered: > I was looking at some of the templates, and noticed there seemed to be alot > of > duplication between ./detail.php and ./main.php > > Is there a reason to do so? > > I have put common pieces into a ./header.html and ./footer.html, and where > there are differences in those, I just do: > > <?php > > if (isset($IMG)) > echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); > else { > $pg = tpl_pagetitle($ID,true); > if (strlen($pg) >= 40) > $pg = "..." . substr($pg, strlen($pg) - 40); > echo "[["; > tpl_link(wl($ID,'do=backlink'),$pg,'title="'.$lang['btn_backlink'].'"'); > echo "]]"; > } > > ?> > > and it seems to work - and keep all the common bits in a single place... > > Downsides that I'm unaware of? So, none? -- DokuWiki mailing list - more info at http://www.dokuwiki.org/mailinglist