Form article plugin: custom link to article

schacke

Member
I tried to use the {readmore} in the custom detail URL in the list. But that didn't seem to work. How do I link to the generated articles from the list view?
 
A Fabrik record with article plugin can belong to multiple articles (with identical content) if you select multiple categories.

Assuming you have only one category
The article id is in your Reference element in a JSON string {"catid":"articleid"}.
So you could add a calc element and "Retrieving data from complex elements"
http://fabrikar.com/forums/index.php?wiki/calculation-element/

Something like
$ref = FabrikWorker::JSONtoData($data['your-ref-element'], true);
if (empty($ref)) {
///do something
}
else {
$myid = current($ref);
return '<a....';//build your link
}
 
Okay - thank you. Maybe the answer is a little bit out of my leage, but I'll give it a try :) So I kan only link from the calc element and not from an image (nor from the list settings)?
 
Link from list view:
set calc to display in the list (and title to not display; if you got it working you may the calc set to "hidden" to hide it in the form/details view)
You can display an image with the link, just put it into the <a tag

return '<a href = "index.php?option=com_content&view=article&id=' . $myid . '&Itemid=X"> <img scr="your-image-path"></a>';

set X to your menu item id
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top