View Single Post
Old 25 Jan 2011, 19:10
HouseAddict HouseAddict is offline
Join Date: Jul 2008
Originally Posted by Lynne View Post
If you want them in other templates, you must write a plugin to register them for use in the other template. Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide
And that's a short guide?

Geez... I just spent almost an hour going through it and trying it out without any success.

Tsk, why does this have to be so darn complicated...

Hmm, how can I extend that $pub_view array to be available to other templates, not just vbcms_edit_publisher (as defined in content.php) in an easier manner...

--------------- Added 25 Jan 2011 at 20:07 ---------------

It seems that I am having some issue with spitting out the value in the front-end as well... adding that code to vbcms_content_article_page prints out nothing.

Seems the root of the problem is $view->FIELDNAME = $this->content->getFIELDNAME(); in the plugin attached to vbcms_article_populate_start... as if I change that $view->FIELDNAME value to a constant, I get a value out on the front-end and in all the other templates (weird). If I leave it as $this->content->getFIELDNAME(), it ends up blank.

Last edited by HouseAddict; 25 Jan 2011 at 20:07. Reason: Auto-Merged DoublePost
Reply With Quote