Package tools and Ajax

Permalink 1 user found helpful
Hello all :)

I have a problem with tools files.
I have an ajax request on tool file "load.chat.php"
It works with ajax url :
...index.php/tools/dialogs/load_chat.php


But today, i want to copy my work in a package.
And the ajax request not works with :
...index.php/packages/test/tools/dialogs/load_chat.php

Firebug returns ajax request => Not found.

I have search in concrete5.org and if you have a folder tools in your package, the url is :
...index.php/tools/required/dialogs/load_chat


In firebug, the ajax request is => Ok, but nothing is returned even if I do a simple echo 'hello' in my "load.chat.php",

Can you help me ?

Emixam25
 
Emixam25 replied on at Permalink Reply
Emixam25
Hello i find solution :

2 solutions :
$url = Loader::helper('concrete/urls');
$tools_url = $url->getToolsURL('load_chat','test');


or link

$this->url($resultTargetURL).'index.php/tools/packages/test/dialogs/load_chat.php