Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Templates - add html comments so we know what template is used..

Aloittaja hstraf, tammikuu 26, 2006, 02:00:32 IP

« edellinen - seuraava »

hstraf

It would be nice to add a brief HTML comment at the start and stop of each template component file, so we can easily "see" (by viewing source) which file is needs to be modified.

For example, if we view source and search for "xyz.gif", we could then see that this graphic is called on template page [insert name here].

This would make editing templates much easier, because now it is kind of "trial and error" to figure out what template is responsible for displaying what.

Thanks!

dtm.exe

Does the file's prefix not say it all?

Profile.template.php
BoardIndex.template.php
MessageIndex.template.php

hstraf

Lainaus käyttäjältä: dtm.exe - tammikuu 26, 2006, 02:13:46 IP
Does the file's prefix not say it all?

Profile.template.php
BoardIndex.template.php
MessageIndex.template.php

Barely.  Like I said.. it's just a suggestion to improve how things work now.  Sure, you can read the names, and try to figure out what is what.. but it's often easier to just "view source" and immediately see the template name right there in the code. 

<!-- Start MessageIndex.template.php -->
asdfad
<!-- End MessageIndex.template.php -->

Wouldn't add much size to the page, and would make it just that much easier to figure out what is doing what.

Thanks!

Advertisement: