![]() |
Get CMS section in plugin code
I am trying to create a Tab for a specific CMS section. For this I am creating a plugin that adds the tab.
My question: How do I check if the curent article belongs to a specific section? Its easy to check that I am in the CMS by using if (THIS_SCRIPT == 'vbcms') but what can I use to check for the category an article belongs to? :confused: :erm: :eek: |
I believe you want to look at the parentnodeid. Take a look at the table cms_node
|
Thanks, but how do I get parentnodeid?
Can I test something like if ($parentnodeid == 3) ? |
Since I haven't tried this, I can't tell you exactly how to do it. I just know that that is the variable you'll need. If I were to do this, I'd play with a few plugins and see what I could figure out and I'd also look in the code to see what variables are available, and more importantly, what their names are.
|
I found something called $sectionid but it seems that this variable can not be used when creating a tab plugin using this method: https://vborg.vbsupport.ru/showthread.php?t=226914
|
As I just wrote in another thread, some templates are rendered at the beginning of the page and so page variables aren't available for use unless you do something in a plugin to make that so beforehand.
|
All times are GMT. The time now is 07:17 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|