reading url

JVR Productions

New Member
Hello it's possible to read the url and used with "" for example aaa.com/index.php/mprojects/details/19/1 I want to read the 1 at the end of the url and used to filter a list using {fabrik view=list id=1}
Thanks for any help
 
Yes.

I can't offhand remember if rowid is avilable as a placeholder at that point. You can use query string arguments in the plugin, by surrounding them in [square] parens rather than {curly} ones. Don't ask, it's to do with PHP regular expressing matching, and how hard it is to use RE for embedded patterns, i'e' {fabrik ...{foo}}. I *think* that the SEF router will have turned that /1 into the normal QS arg, formid=1, so you should be able to do {fabrik view=list id=[formid]}.

If not, then you'll have to use something like Sourcerer to embed some PHP, and do it by hand, like ...

Code:
{source}
<?php
$app = JFactory::getApplication();
$input = $app->input;
$this_id = $input->getInt('formid');
echo "{fabrik view=whatever id=$this_id}";
?>
{/source}

NOTE - it looks like you are making the assumption that the List ID is always going to be the same as the Form ID, which is not necessarily true. There is a way to get the list ID for a given form ID, which I can show you if you need it.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top