[pmwiki-users] Breadcrumb links in skins with Hg

Philip Cook p.cook at cs.ucl.ac.uk
Thu May 3 17:51:44 CDT 2007


Hi all,

I am having trouble making the breadcrumb link appear in a skin. I  
can get the page-level breadcrumb link just fine with [=(:breadcrumb:) 
=]. I have been working from the page

http://www.pmwiki.org/wiki/Cookbook/Hg?action=browse

As it says there, I added the following to config.php:

     [= $FmtPV['$BreadCrumb'] = 'HierarchicalPagenames($group,  
"BreadCrumb")'; =]

But I can't figure out how to use that variable. I am trying to add a  
BreadCrumb to the "NotSoSimple" skin. The skin has a script

     cookbook/notsosimple/notsosimple.php

that sets various variables, including the page title. I edited that  
file to include $BreadCrumb in each page, but that resolves to  
"Site.BreadCrumb" (no links, just the text) for all pages.

I'm not sure if this is relevant, but I tried playing around with the  
function calls. If I call hgBreadCrumb() directly in notsosimple.php,  
I get the correct BreadCrumb trail, in pmwiki markup. The marked-up  
trail is then printed directly on the web page. I then attempted to  
convert the breadcrumb to HTML by doing:

     $str = hgBreadCrumb();
     $crumbtrail = MarkupToHTML($pagetitle, $str);

But calling MarkupToHTML like this seems to destroy the wiki to HTML  
conversion on the page.

Am I missing something, or going about this completely wrong?  I  
should add that I have also set $EnableHgCleanUrls=1.

Thanks,


Phil



More information about the pmwiki-users mailing list