Looking at the code for the plugin, I see that ChronoConnectivity v5 plugin also allows passed parameters similar to ChronoForms v5 plugin (by the way, I added the fix for the amp;var problem here too).
I see that in your WHERE clause example you suggest:
<?php
// where $var is an integer
$var = JRequest::getVar('param','', 'get');
return array (":test.id > {$var}");
?>
I tried replacing 'parm' with my variable name, but get back nothing. I know the {$var} substitution is working as I tried setting $var to a hard value.
How do I get to the variable activity_id value passed via {chronoconnectivity5}ActivityList&activity_id=15{/chronoconnectivity5} from inside the WHERE clause PHP code?
Thanks for your help,
Jim
I see that in your WHERE clause example you suggest:
<?php
// where $var is an integer
$var = JRequest::getVar('param','', 'get');
return array (":test.id > {$var}");
?>
I tried replacing 'parm' with my variable name, but get back nothing. I know the {$var} substitution is working as I tried setting $var to a hard value.
How do I get to the variable activity_id value passed via {chronoconnectivity5}ActivityList&activity_id=15{/chronoconnectivity5} from inside the WHERE clause PHP code?
Thanks for your help,
Jim
Never mind...
I was able to figure it out looking closely at the CC v5 plugin code...
I used the following WHERE clause PHP code:
<?php
$activity_id = \GCore\Libs\Request::data("activity_id");
return array (":activities.activity_id = {$activity_id}");
?>
This worked!
Jim
I was able to figure it out looking closely at the CC v5 plugin code...
I used the following WHERE clause PHP code:
<?php
$activity_id = \GCore\Libs\Request::data("activity_id");
return array (":activities.activity_id = {$activity_id}");
?>
This worked!
Jim
Hi Jim,
That looks good.
The problem with the Joomla! methods is that Max has used PHP Namespaces for much of the v5 code which means that calls like JRequest:: . . . fail. I have found that you can access the parent - Joomla! - namespace by adding a \ prefix e.g.
Bob
That looks good.
The problem with the Joomla! methods is that Max has used PHP Namespaces for much of the v5 code which means that calls like JRequest:: . . . fail. I have found that you can access the parent - Joomla! - namespace by adding a \ prefix e.g.
$var = \JRequest::getVar('param','', 'get');
Bob
Thanks Bob, I will try that.
Jim
Jim
This topic is locked and no more replies can be posted.