Consumable object

Permalink
Hey Guys,
A client of mine asked me to create a consumable webobject of the website header and footer.
Do you think I can accomplish this in C5?
I'm basically looking to spit out the current header nav with some html wrappers on it. Any help you be great. I'm thinking a single page or tools?

johndorsay
 
ijessup replied on at Permalink Reply
ijessup
I'm not quite sure what you mean by consumable.

However, look into the addHeaderItem() function that you can use in block, page and template controllers.

In a block it would be something like:
$this->controller->addHeaderItem("<script>function{blah()};</script>");
In a page controller it would be something like:
public function view(){ $this->addHeaderItem("<script>function{blah()};</script>");}
And in a template it would be something along the lines of...
$view = new View;
$view->addHeaderItem("<script>function{blah()};</script>");
Keep in mind all of this is from memory and probably not 100% accurate, but it should get you on the right path! :)
ScottC replied on at Permalink Reply
ScottC
Definitely just use a file under tools, though I guess you could do a singlepage with a theme set to none and accomplish the exact same thing