Changing the Delete Icon In List

teoyh

Member
Delete_button.JPG

Hi ;

may i know how can i change the Delete Icon X to something like a dustbin.

I did a search and someone had posted something like this ;

.fabrik__rowlink.icon-search::before{
content:"\e024";
}

but not sure what the content:"\e024" is refering to ?

Many thanks
 
That was probably posted before we converted all this stuff to using layouts.

Easiest way is to override the listactions/fabrik-delete-button.php layout.

See the wiki for details on overriding a layout.

Short version, copy ./components/com_fabrik/layout/listactions/fabrik-delete-button.php to ./templates/<your site template>/html/layouts/com_fabrik/listactions, and replace $d->list_delete_icon with your icon of choice in the call to FabrikHelperHTML::image(), so like ...

Code:
    <?php echo FabrikHelperHTML::image($d->list_delete_icon, 'list', $d->tpl, array('alt' => $d->label))?> <?php echo $d->text;?></a>

... becomes ...

Code:
    <?php echo FabrikHelperHTML::image('trash', 'list', $d->tpl, array('alt' => $d->label))?> <?php echo $d->text;?></a>

Placing this in your site template layout folder will override it for all lists. If you only want to override it for a specific Fabrik list template, copy it to ./components/com_fabrik/view/list/tmpl/<your list template>/layouts/listactions.

-- hugh
 
Thank you for your prompt reply

This is what i see inside the php files ;

<?php echo FabrikHelperHTML::image('trash', 'list', $d->tpl, array('alt' => $d->label, 'icon-class' => $d->iconClass))?> <?php echo $d->text;?></a>

I had replace the name to trash but just curious which folder is it picking up the icon from ?
 
It doesn't. If you don't specify a file extension on that arg to the image helper, it doesn't uss an img, it uses an icon class (like icon-trash), and it depends on your site template as to what icons are available (like glyph icons, or font awesome, etc).

Sent from my HTC6545LVW using Tapatalk
 
IS there any way to remove the Delete icon on the header row of a list and replace it with non hyperlinked text "Actions"

I only want this done for the Header, not the list content rows.
 
As is, you'd have to use a custom template and modify default_headings.php.

But we do have a plugin hook, onGetPluginRowHeadings, which lets plugins alter the headings, which we use in things like the 'pivot' and 'j2store' list plugins.

But ... currently no generic way of adding your own code.

But ... I could add it to the php_events list plugin ...

Back in a few ...

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

Thank you.

Members online

Back
Top