Include inside package's single page issues
Permalink
Hi,
I'm trying to include a file out of my tools folder within my package inside one of my dashboard single pages but it does not work.
Here is the code i am using to include the file:
and here is the error i am receiving:
any ideas?
Thanks in advance!
I'm trying to include a file out of my tools folder within my package inside one of my dashboard single pages but it does not work.
Here is the code i am using to include the file:
$this->inc("tools/calendar.php", "match_manager");
and here is the error i am receiving:
Warning: extract() expects parameter 1 to be array, string given in /home/sites/polarbearsdonteatpenguins/concrete/core/libraries/view.php on line 412 Warning: include(/home/sites/polarbearsdonteatpenguins/concrete/themes/dashboard/tools/calendar.php): failed to open stream: No such file or directory in /home/sites/polarbearsdonteatpenguins/concrete/core/libraries/view.php on line 419 Warning: include(): Failed opening '/home/sites/polarbearsdonteatpenguins/concrete/themes/dashboard/tools/calendar.php' for inclusion (include_path='/home/sites/polarbearsdonteatpenguins/libraries/3rdparty:/home/sites/polarbearsdonteatpenguins/concrete/libraries/3rdparty:.:/usr/share/pear') in /home/sites/polarbearsdonteatpenguins/concrete/core/libraries/view.php on line 419
any ideas?
Thanks in advance!
The easy answer is to move the shared code between the tool and the single page into a library containing a class, then use the regular C5 loader::library to load the library into both the tool and the single page.
Thanks for the quick reply,
If I used this method, how would I go about re-loading the calendar using ajax?
If I used this method, how would I go about re-loading the calendar using ajax?