Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to get CssClass or UrlCode inside a theme Hook
jonaguera
New
I want to make an RPC call from the category index page and embed some html returned from the external service. I've create a theme hook for this, so I can embed data returned from external service in certains places of the template.
In adition, I want to send a parameter in the RPC request, some data from the current category, in order to get a different response. It would be great if, in a category page, I could send the value of GDN_Category.UrlCode or GDN_Category.CssClass.
Is there any way to achieve this?
Thanks in advance.
0
Best Answer
-
jonaguera New
Self-response ...
public function CategoriesController_AfterNewDiscussionButton_Handler($Sender, $Args) { $CssClass = $Sender->Data('Category.CssClass'); /** My stuff .... **/ }
8
Answers
Self-response ...
public function CategoriesController_AfterNewDiscussionButton_Handler($Sender, $Args) { $CssClass = $Sender->Data('Category.CssClass'); /** My stuff .... **/ }