Article Template Breadcrumb

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Article Template Breadcrumb

Post by jsw_nz »

I had the interest to put a breadcrumb tag inside given article templates (am planning to display article summaries - across categories), so two wee edits.

For Article Listings, open:
include\inc_front\front.func.inc.php

find this line (approx: 1485) inside function list_articles_summary :

Code: Select all

$tmpl = $tmpllist[ $article_list[$key]["article_image"]['tmpllist'] ];
after this line add:

Code: Select all

$tmpl = render_cnt_template($tmpl, 'BREADCRUMB',breadcrumb($article_list[$key]["article_cid"],$GLOBALS['content']['struct'],$link_to,$spacer));
For Full Article Template, open this file:
include\inc_front\content.article.inc.php

find this line (approx: 222-223) :

Code: Select all

if($row["article_image"]['tmplfull']) { 
//rendering
after these lines add:

Code: Select all

$row["article_image"]['tmplfull'] = render_cnt_template($row["article_image"]['tmplfull'], 'BREADCRUMB',breadcrumb($content["cat_id"],$GLOBALS['content']['struct'],$link_to,$spacer));
Inside your article templates
just use the curly braces markup

Code: Select all

{BREADCRUMB}
and you should be good to go:
Example:
Image

Cheers,
:D :D
Post Reply