Can you write me an example, so I will replace it with my forum ID and image url?You can target the node in CSS and usecontent: url(path_to_your_image);
I tried this in extra.less - This doesnt work, not even or normal discussion forums :/Something like that
CSS:.node.node--idX .node--search .node-icon { content: url(path_to_your_image); }
.node.node--idX {
&.node--forum {
.node-icon i:before {
content: url(path_to_your_image);
width: 32px;
}
&.node--read .node-icon i:before {
opacity: 0.5;
}
}
}
.node-search
after &.node-forum
So like this?CSS:.node.node--idX { &.node--forum { .node-icon i:before { content: url(path_to_your_image); width: 32px; } &.node--read .node-icon i:before { opacity: 0.5; } } }
With this code opacity will be applied to image when forum is read, and image will be without opacity when forum is unread.
it will works for basics forums
So i think for search forum just add.node-search
after&.node-forum
@BassMan style
Hi!CSS:.node.node--idX { &.node--forum { .node-icon i:before { content: url(path_to_your_image); width: 32px; } &.node--read .node-icon i:before { opacity: 0.5; } } }
With this code opacity will be applied to image when forum is read, and image will be without opacity when forum is unread.
it will works for basics forums
So i think for search forum just add.node-search
after&.node-forum
@BassMan style
So like this:Try removing.node--forum
from your example.
node-search
. There are double -
characters, so it should be like node--search
..node.node--id99 {
.node-icon i { display: none; }
&.node--search {
.node-icon {
background-image: url(path_to_your_image);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}
&.node--read .node-icon {
opacity: 0.4;
}
}
}
I checked the mobile site and it appears that the icon is smaller then the others in mobile view...I will need to see this on your site but try adding this to your extra.less template:
Less:.node.node--id99.node--depth2.node--search { margin-left: 0px !important; }
Or adjust the margin to a negative value. Check the mobile view after changing.
Sure thanks!Like said, will need to see this on a live forum. You can PM me if you want.
We use essential cookies to make this site work, and optional cookies to enhance your experience.