Issue with Tool inside of Package
Permalink
I am attempting to make a package that will contain a tool that will be called on attribute update.
My folder structure is as follows:
I am using getToolsURL() to get the URL of my tool.
The value of $tools_url is:
When I go to that URL there is no output. Despite /packages/mycustomattribute/tools/mytool.php containing nothing more than "HELLO?". Why does the tool inside my package not work?
My folder structure is as follows:
packages --mycustomattribute --attributes --mycustomattribute --tools --mytool.php
I am using getToolsURL() to get the URL of my tool.
$url = Loader::helper('concrete/urls'); $tools_url = $url->getToolsURL('mytool','my_custom_attribute');
The value of $tools_url is:
http://localhost/index.php/tools/packages/my_custom_attribute/mytool
When I go to that URL there is no output. Despite /packages/mycustomattribute/tools/mytool.php containing nothing more than "HELLO?". Why does the tool inside my package not work?
I see underscore _ differences in your folder structure and the output of $tools_url.
Why not go with namespacing
I have a 'tool' in:
/package/mypkg/src/tool.php
I include it in my controllers with:
then I can do: