XF 1.4 Hiding Elements - CSS. vs Removing/Commenting Out

Amaury

Well-known member
Just a general query.

I know either way works--which means the "if it works, then it doesn't really matter" comes into play here--but when it come to wanting to hide things like the forum list title, the likes bar, etc., what's generally better?

CSS:

Code:
.forum_list .titleBar h1 {
    display: none;
}

Or removing/commenting out in the corresponding template:

Code:
<xen:comment><xen:h1>{$xenOptions.boardTitle}</xen:h1></xen:comment>
 
I generally prefer to hide elements with the CSS, because it's much faster. I don't really feel the difference to comment or hide an element with the CSS. It's like it was the same thing.
 
I generally prefer to hide elements with the CSS, because it's much faster. I don't really feel the difference to comment or hide an element with the CSS. It's like it was the same thing.
If you comment with xen:comment then that code is not rendered at all and doesn't appear in the output of the page. If you hide with css or html comments then that information is still accessible via the page source.
 
If you comment with xen:comment then that code is not rendered at all and doesn't appear in the output of the page. If you hide with css or html comments then that information is still accessible via the page source.
Yes, I know, but I prefer hide with CSS.
 
Last edited:
Top Bottom