Hi.
I have been struggling with the following problem.
I have a php file, which is basically an ajax-powered box that is linked to a 3rd party transit planning tool. the box allows the user to provide departure/destination and opens an external url in the lightwindow. it also uses jquery autosuggest functionality to aid user when providing the departure/destination.
the file, when called directly in the browser works correctly.
in order to include it in the page class i have done the following:
1) in the Page.ss in the Page_Controller extends ContentController section i have added the following function:
public function getBufferedContent() {
ob_start();
include('wartabud.php');
$return = ob_get_contents();
ob_end_clean();
return $return;
}
2) put the wartabud.php file in the same directory as Page.php
3) called the function $getBufferedContent in the Page.ss template.
As a result, i got the wartabud.php to display where i wanted, but its there without any functionality (ajax, lightwindow etc.)
The wartabud.php, as you might assume, has some 170lines of code so preferred to have it as separate file.
Could anybody tell me what are my options here? I do require the funcitionality of including such external pieces of code, as i need it for my client's websites.
thanx for any tips and please do try to keep any suggestions simple if possible (im a designer, not a coder)
qlex