passing 'rowid' to a placeholder in article

notoddd

New Member
First I have to say that I am truly amazed by Fabrik. I could build site a with joomla and include a full archive of 'study subjects' without knowing a single word of PHP JS code.. Amazing..
Everything run smooth until I decided to insert a PHP button on a list. The button should open a new window with a custom report (joomla article) that will include data from the selected record by using fabrik placeholders. To do so I used the following strategy...
I inserted the js code in a PHP plug-in in a list 1.

var url1 = 'index.php?option=com_content&view=article&id=1&param1=';
var myrowid = ??? how to obtain rowid???;
var addr = url1.concat('myrowid');
window.open(addr,'_blank','scrollbars=yes');

the placeholders in the new window are in the form:

{fabrik view=element list=1 rowid=[param1] element=ambvis___ct}

Now, I can open a new window and obtain the first row of the list if I use rowid=1 , but I can't find a way to obtain the rowid of the selected row. I tried different solutions found in the forum, but none worked..
Clearly I should study php and js..
Still, any help??
 
Use the new 'link' list plugin, that's a lot easier than using JS/PHP. It's not yet been released as am installable ZIP yet (that'll happen when we release the next version of Fabrik when J! 3.7 releases), but if you do a github update (see wiki, TL/DR just download https://github.com/Fabrik/fabrik/archive/master.zip, unzip it locally, and upload the ENTIRE content to overwrite the files on your server, and yes, it's huge and takes a while) you can then "discover" it in J!'s extension manager.

Then just specify index.php?option=com_content&view=article&id=1&param1={rowid} as your URL in the link plugin.

-- hugh
 
Hugh, it worked like a charm...
I used the 'link list plugin' supplying custom parameters in the link..
I just set param1 to pass list1 rowid and param2 to pass the ID of the joined list 2 as {table___element_raw} to avoid to pass the joined label.
Then in the article I used {fabrik view=element list=1 rowid=[param1] element=table___element} using param1 or param2 to pull down all requested element values, and "et voila'"
A custom report was up in minutes...
You guys really brought Internet to the next level...!!
SOLVED...Thanks...
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top