![]() |
commenting out $block_data[latestentries]
I'm working with member profiles... but I'm sure other templates use $blocks
I want to hide some of the blocks, like $blocks[vistors] etc. I don't see anything in the control panel to disable some of this stuff so I'm just hiding it in the templates, but I don't want to straight up delete it in case at some point I want to reintroduce the functionality. So I'm commenting out the code, but this doesn't work <!--$block_data[latestentries]--> Instead I need to do this <!--$--><!--block_data[latestentries]--> The $ sign needs to be commented separately. 1) Am I making a workflow mistake by commenting code rather than looking for another way to manage the blocks. 2) Is there a better way to hide the code in the template without deleting it (i.e. a different comment system). |
Use the <vb:comment> </vb:comment> tags. In most cases it will work better.
When using the HTML comment tags, best practice is to leave a space in the tag. For example: <!-- $ --> |
Isn't <vb:comment> </vb:comment> just for vbulletin 4 and higher?
|
Two other methods I use.
1.) Use CSS and temporarily hide the block from the device using "display: none". Of course the HTML is still sent to the user. Use this for a temporary measure as you do not have to alter the template to accomplish it. 2.) I create a special user account called 'adminview', then instead of using <vb:comment>, I use a regular conditional on the 'adminview' user account. --------------- Added 06 Mar 2014 at 07:38 --------------- Quote:
|
Thanks!
|
All times are GMT. The time now is 04:00 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|