PDA

View Full Version : Node and Parent Node Variables In Plugin


brandondrury
01-02-2013, 05:09 PM
I'm attempting to display a specific php included file for each of my cms sections to display in the Navbar. I've found the variables if I'm using Navbar templates, but due to my need to included 20 different files, I don't want to have to create a new plugin for each section.

(I'm not aware of a way simple, one line method to include a file via the templates without using a plugin.)

So my idea was to do a single plugin that checked for the cms node id or parent node id, included the file as needed, and returned that output as a single variable which I'd toss in navbar.

I've done this with the forums with no trouble, but the cms is killing me. I can't seem to find variables that work or maybe I'm using the wrong hooks. I've tried many.

Brandon

brandondrury
01-06-2013, 11:08 PM
bump

kh99
01-07-2013, 09:35 PM
Try using hook location parse_templates, and use a global statement at the beginning for the variables you're trying to use (i.e "global $nodeid;").