Includes and Comments

General ShopSite user discussion

Includes and Comments

Postby ajhauser » Thu Dec 08, 2011 11:08 pm

After setting up several includes, I can see that some end with a nice comment so I can see that they're working, and some do not. After testing manually, I can see that all of my includes work - but does anyone have any idea why some of them do not add a comment at the end like this?

Code: Select all
<!-- ***** End of Include: Bro_LogoUserButtons -->


Thanks very much.
Website Design, Website Development, eCommerce and Hosting
ajhauser
 
Posts: 84
Joined: Tue Dec 06, 2011 4:18 pm
Location: Earlville - the land of Earls

Re: Includes and Comments

Postby Jim » Fri Dec 09, 2011 7:43 am

Designer forgot to put it in would be my guess.

If you have lots of small includes, putting in a comment at the top and bottom of each include can add a lot to the size of the html page that the browser has to download. Although 2 lines doesn't make much difference, if you have 10 includes for a product and 20 products on a page that would be 400 lines of code that need to be downloaded but that aren't really necessary.

Also you can add comments in the template that are stripped out of the generated html by inserting a # character as the first charaxter on a line.

In recent versions there is also an option, I think on the Utilities >Publish page to automatically add the template name as a comment when publishing.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Includes and Comments

Postby ajhauser » Sat Dec 10, 2011 10:48 pm

Ok that makes sense - I just wanted to make sure that this did not signal some sort of error.
Thanks Jim.
Website Design, Website Development, eCommerce and Hosting
ajhauser
 
Posts: 84
Joined: Tue Dec 06, 2011 4:18 pm
Location: Earlville - the land of Earls


Return to User Forum

Who is online

Users browsing this forum: No registered users and 121 guests