Forum Discussion
You're on the right track putting your script in the wrapper Page Head Content, though there are several other ways of including script blocks, depending on your preference. Previous advice is sound, though you can probably simplify this one a bit. You might leave the CSS rule which hides the icons, then just turn on the ones for the roles you want -- assuming you have far fewer Admin and Support users here than ordinary users -- which you should be able to select like so:
<script type="text/javascript"> (function($){ $(document).ready(function() { $('.lia-user-rank-icon-left[title="DigitalPlatforms Support"], .lia-user-rank-icon-left[title="Administrator"]').show(); }); })(LITHIUM.jQuery); </script>
I've wrapped this in a doc.ready so it won't execute until all of the elements in question are loaded. You could substitute Lithium versions of the <script> and doc.ready bits, though that's really not necessary if you're executing this in your wrapper header.
Cheers,
Tyson
Also, if you're going to stick this script in the wrapper header, you might want to wrap it with something like the following:
<#if page.name == "ForumPage"> <script> ... </script> </#if>
So it doesn't execute on every single page on the site.
Cheers,
Tyson
Related Content
- 10 months ago
- 11 months ago
- 2 years ago