XF 2.2 Photos as icons?

Alvin63

Well-known member
So I was wanting to change the cog icons on Resource Manager and uploaded an avatar sized photo instead. Seems to work ok but is that an ok way to do it? Elsewhere I've seen people editing code to change this icon. The downside is I have to manually upload the avatar photo every time I add a resource. Can I automatically link this photo to be added each time?
 
Last edited:
You can change the default cog icon by adding this to the extra.less template:
Less:
.avatar.avatar--resourceIconDefault > span:before
{
    content: url(path/to/image.png);
}

Upload the image to the server and change the path accordingly.

Resource categories are created in the ACP: admin.php?resource-manager/categories/
 
I don't quite understand why I need to change the extra.less. Is that because if I just replace the cog icon with a .png image (it lets you do that) it won't be saved to the server in a back up?

Where would I find the extra.less for this to edit. And haven't a clue how to upload an image to the server :(:(

Sorry if I've misunderstood. Are you saying that editing extra.less and uploading the photo to the server means it doesn't need to be done manually every time? And it's still ok to upload the .png photo manually instead? Thanks.
 
Last edited:
Top Bottom