Commenting out template code

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
FlipC
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri May 01, 2015 8:45 am

Commenting out template code

Post by FlipC » Fri May 01, 2015 11:06 am

I've been trying to comment out the following bit of code using the built-in Template editor:

<div id="comp_<?php echo $compwidth ?>">
<jdoc:include type="component" />
<?php include "html/template.php"; ?>
</div>

I've added <!-- --> top and bottom, I've added /* */ top and bottom, // every line, and even enclosed it in a <?php /* */ ?> block. The results respectively are that it displays --> and blanks everything past that point, displays /**/, displays ////, or just blanks out everything past the entry.

What the heck am I doing wrong?

jcms
I've been banned!
Posts: 2233
Joined: Wed Nov 19, 2014 9:23 am

Re: Commenting out template code

Post by jcms » Fri May 01, 2015 4:02 pm

var_dump your variable and your path "include"?

FlipC
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri May 01, 2015 8:45 am

Re: Commenting out template code

Post by FlipC » Thu May 07, 2015 9:27 am

Okay I added <!-- --> to either end of the php block and output was the decode in comment; adding /* */ to the include simply outputted the comment marks but without displaying them this time. so the jdoc must be part of the main template into which this got inserted hence the issue with commenting out the entire block.

Just for reference:

added a var_dump($compwidth); but just messes with output.

template.php contains: <?php echo(base64_decode("PGRpdiAgc3R5bGU9InRleHQtaW5kZW50Oi05OTk5ZW0iPkNob29zaW5nIHRoZSA8YSBocmVmPSJodHRwOi8vd2ViaG9zdGluZ3RvcC5vcmciIHRpdGxlPSJ3ZWIgaG9zdGluZyI+YmVzdCB3ZWIgaG9zdGluZzwvYT4gc29tZSB0aW1lcyBjb3VsZCBiZSBkaWZmaWN1bHR5ICBpZiB5b3UgZG9uknQga25vdyB3aGF0IHRvIGxvb2sgZm9yLiBSZWFkIDxhIGhyZWY9Imh0dHA6Ly93ZWJob3N0aW5nY2VudGVyLm9yZyIgdGl0bGU9IndlYiBob3N0aW5nIj5ob3N0aW5nIHJldmlld3M8L2E+IGFuZCBpZiB5b3UgbWF5IGxpa2Ugd2UgaGlnaGx5IHJlY29tbWVuZCB1c2luZyA8YSBocmVmPSJodHRwOi8vdG9wZ3JlZW5ob3N0aW5nLm9yZyIgdGl0bGU9Imhvc3RpbmcgcmV2aWV3cyI+Z3JlZW4gaG9zdGluZzwvYT4gc2VydmVycy48L2Rpdj4NCg==")); ?>

Which if you decode should show why I want to remove it. ;)


Locked

Return to “Templates for Joomla! 1.5”