Recent searches
No recent searches
Selectively display attachments in Guide articles
Answered
Posted Sep 29, 2023
In Guide, for some articles I want to link to an article attachment in the body of the article rather than have the attachment shown at the bottom of the article. I know that in style.css I can hide displaying attachments for all articles:
.article-attachments {
display: none;
}
What I want is to be able to do the above but selectively per article without having to modify a conditional section in a hbs file with specific article IDs. Is this possible in the CSS?
3
4
4 comments
Ifra Saqlain
@Tom Richards,
only with CSS, I don't think it's possible but you can use JS to achieve this instead of checking IDs on hbs file.
If any confusion feel free to ask :)
Thanks
0
Cameron | Traeger
Tom Richards,
This is something I've been trying to figure out since we migrated our help center to Zendesk two years ago! I think it's ridiculous that attachments only appear at the bottom, especially when wanting to attach/link/display something like a product manual or assembly guide into a table.
The workaround I found this morning is a bit arduous, but it works!
If anyone out there has a better way, I'm all ears :)
0
Tom Richards
Cameron | Traeger
I've done this as well on occasion, but what spurred my question is my dislike for having both a link in the body and an attachment at the bottom.
By definition an attachment is something at the bottom of an article, so it makes sense why they show there. What we (and a few others) are looking for is a simple way to, in the article body, link to a document stored in the zendesk domain, which is what your workaround does.
An alternative to your step 1 is to attach the document to another article altogether, e.g., an article whose sole purpose is attaching things to. Then the doc won't also appear as an attachment in the article where you've linked to it in the body. The caveat is to make sure the permissions on the article it's attached to are not more restrictive than the one that is linking to it.
0
Daniel Corriveau
How come when I put this at the bottom of my style.css the attachment are still appearing in the articles?
.article-attachments {
display: none;
}
0