Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Comments in the templates


Reply


2 Posts   1275 Views

Avatar
KatB

Community Member, 94 Posts

28 February 2008 at 1:37pm

I am sure this is obvious and I am sure my question makes all experienced SS developers and users groan, but

Can I put comments in a template so that the next time I read the template I can understand the thinking behind the code, but it doesn't get translated for the browser? And if so, what does those comments look like?

Avatar
Willr

Forum Moderator, 5513 Posts

28 February 2008 at 8:26pm

you have to use normal html comments I guess for your templates <!-- this is a comment --> if you don't want it to show up in the browsers view source you could create a method in Page called Comment so you would have

function Comment() {
return false
}

then in the template you could use <% if Comment %><!-- Write all your notes in here --><% end_if %>