Replace with icons - standard template location?

Johannes

New Member
Hey everybody,

I am working on a webpage using Fabrik 3 for testingpurposes. I would love to replace values with icons in the tableview. The element is a databasejoin to a fieldelement, containing a single word like small, middle and big.

I activated replace with icons function, but I have no clue where to place the icons. In which
folder do I have to put the icons?

As far as I remember could I choose the folder in fabrik 2.1.

When using a databasejoin, do the files have to be called small.png, middle.png and big.png or must I use the id of the element?
 
hi this has changed since fabrik 2.1 as we now allow for template overrides.
So it will loop through the following folders to find the images:

templates/yourJtemplate/html/com_fabrik/form/yourformtmpl/images
templates/yourJtemplate/html/com_fabrik/form/images
templates/yourJtemplate/html/com_fabrik/images
components/com_fabrik/views/form/tmpl/yourformtmpl/images
media/com_fabrik/images/


The first image found is used

Off the top of my head i believe the stored value is used, so if your database join has:

value = 1 label = 'one'
then the image should be '1.png'
However, I've not confirmed that is the case

-Rob
 
It works!

Hy Rob!

Thanks for the fast answer. I got it to work fine. I put the file into thetemplates/yourJtemplate/html/com_fabrik/images.

I had to name the images after the labels in my databasejoin to work. They don't show up, when I take the id.

Greetings,

Johannes
 
I have a bit of a bug with this one.

The icon shows but the element label is partially shown below the icon.


What I actually see is the url link below the icon as

foo"> (foo being the label of the element)




Commenting out

Code:
$data = '<span>' . $data . '</span>';

Around line 313 in \components\com_fabrik\models\element.php
resolves the issue but probably isn't the proper fix.

This is a dbjoin.

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

Thank you.

Members online

No members online now.
Back
Top