Forum for discussing general topics related to Couch.
6 posts Page 1 of 1
A non admin user still sees the 'VIEW' button top right of an admin list page for a clonable template. How can I get rid of it - it leads to a 404 page.
I think the easiest for you would be to inject some CSS into the admin screen to hide the button.
Please see viewtopic.php?f=5&t=10241 for details.
I tried that before I posted but there's no available selector on that button top right that wouldn't also hide other buttons I want to keep displaying.

I added this:

[data-title="View"] {display:none;}

To 'hide.html' (as per one of your other threads) and pulled that in to the template.

It didn't work.

Or do I need to add it to the globals section?
Try using the following within <cms:template> block -
Code: Select all
<cms:config_list_view>
    <cms:style>
        #header a[data-title="View"]{ display:none; }
    </cms:style>
</cms:config_list_view>
Worked perfectly, thanks.

In fact I then went on to add an 'if' as follows:

Code: Select all
<cms:style>
    <cms:if k_user_access_level lt '10'>
        #header a[data-title="View"]{ display:none; }
    </cms:if>
</cms:style>


Can I use a similar technique so I can avoid the custom snippet file I'm using to achieve the same result with the VIEW button at the bottom of non-clonables?
Can I use a similar technique so I can avoid the custom snippet file I'm using to achieve the same result with the VIEW button at the bottom of non-clonables?

Yes, of course.
6 posts Page 1 of 1