Lost Header Nav

Permalink
I was trying to eliminate some page types that weren't needed in my theme and I changed the "handle" for one type.

In doing so, it lost the content for the "Header Nav" block on that page type. Any ideas on how to get it back? I can add a new Auto-Nav object, but not the Header Nav (which has special CSS applied to it).

Thanks for any help.

killroyboy
 
killroyboy replied on at Permalink Reply
killroyboy
So I tracked this down to a special template. In concrete/controllers/install.php the following code throws a special template on the "Header Nav" block:

$detailTemplate = $dt->getMasterTemplate();
$b1 = $detailTemplate->addBlock($autonav, 'Header Nav', $data);
$b1->setCustomTemplate('header_menu.php');


The code is significantly different between blocks/autonav/templates/header_menu.php and blocks/autonav/view.php.

How can I re-apply this custom template? Anyone?
frz replied on at Permalink Reply
frz
custom templates can wrap a block's presentation..

the "v" in MVC= Model View Controller..

http://www.concrete5.org/help/building_with_concrete5/developers/un...
killroyboy replied on at Permalink Reply
killroyboy
Thanks...

I actually found the "Set a Custom Template" link on the block... is that new? That actually worked beautifully.

I figured it was something simple that I was overlooking.
frz replied on at Permalink Reply
frz
been there since early versions of concrete cms... that's really where unique sites come together..
ScottC replied on at Permalink Reply
ScottC
omits the .php and requires the /templates/

so you could write assuming that chunk of code is loading a block type:

$yourblocktypesomehow->render('templates/header_menu');
leave off the php and it might require the leading slash, although from memory it adds it regardless.

That would actually work.

Would like to see your working code though, seems like there are several ways to do something with anything in this cms :)