XF 2.2 Hide download button

Sirmadsen

Active member
Hi,

How can I hide the download button from a resource?

Basically what I'm trying to do is to use the version tab as the main download place, not the button on the main resource page.
 
Solution
Adding this to the extra.less template should work.

Less:
[data-template = "xfrm_resource_view"]
{
    .p-title-pageAction
    {
        visibility: hidden;
    }
}
Adding this to the extra.less template should work.

Less:
[data-template = "xfrm_resource_view"]
{
    .p-title-pageAction
    {
        visibility: hidden;
    }
}
 
Solution
Adding this to the extra.less template should work.

Less:
[data-template = "xfrm_resource_view"]
{
    .p-title-pageAction
    {
        visibility: hidden;
    }
}
I noticed that the download button is only hidden on the main tab, "Overview". Whenever switching tabs the download button is visible. Any way to add to the code so that the button is always hidden?
 
Add any additional pages to the code like so:

Less:
[data-template = "xfrm_resource_view"],
[data-template = "other_page"]
{
    .p-title-pageAction
    {
        visibility: hidden;
    }
}

Use the browser inspector to check the template name of the page you want to affect.

1689011514869.png
 
Add any additional pages to the code like so:

Less:
[data-template = "xfrm_resource_view"],
[data-template = "other_page"]
{
    .p-title-pageAction
    {
        visibility: hidden;
    }
}

Use the browser inspector to check the template name of the page you want to affect.

View attachment 288327
Hmm, adding any other page to that makes the button visible on all pages. I added

Code:
/** HIDE DOWNLOAD BUTTON **/
[data-template = "xfrm_resource_view"]
[data-template = "xfrm_resource_history"]
[data-template = "xfrm_thread_view_type_resource"]
[data-template = "xfrm_resource_extra"]
{
    .p-title-pageAction
    {
        visibility: hidden;
    }
}
 
Top Bottom