Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-07-10 09:41:15
- leafy_loader
- Member
- Registered: 2008-09-25
- Posts: 96
Calling a txp tag function from within a plugin
I’ve created a plugin and am trying to call the function section_list($atts, $thing = NULL) from within it but I am getting the following error message;
“Call to undefined function section_list() in…”I’m calling it like this: section_list(array(‘sections’ => ‘’, ‘break’ => ‘’)); – Just want to list all sections
What am I doing wrong?
Thanks
Offline
Re: Calling a txp tag function from within a plugin
Did you include_once txpath . 'publish/taghandlers.php';
first? If it’s not a public-side plugin you’ll probably need to do that first, otherwise it won’t find the function.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2011-07-10 10:17:54
- leafy_loader
- Member
- Registered: 2008-09-25
- Posts: 96
Re: Calling a txp tag function from within a plugin
That seems to have done the trick, cheers
Offline