Skip to content

Commit

Permalink
Item13883: Docs on skin template comments broken
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Sep 28, 2017
1 parent 25e481a commit 58ae72c
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions core/data/System/SkinTemplates.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1490476899" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1506603718" format="1.1" version="1"}%
%META:TOPICPARENT{name="Skins"}%
%STARTINCLUDE%
---+ Skin Templates
Expand Down Expand Up @@ -159,31 +159,34 @@ and then =* Set SKIN=crumbless,pattern=
Remember: the template path contains the most specific template first.

---+++ Comments
Comments delimited by =#{...}#= are removed from the templates as soon as
Comments delimited by =%<nop>{...}%= are removed from the templates as soon as
the file is read, before any other template macros are evaluated.

An alternative comment type =#{...}#= will automatically absorb whitespace
An alternative comment type =#<nop>{...}#= will automatically absorb whitespace
either side of the comment (newlines, spaces, tabs etc). This type of comment
only works in templates.

The alternative comment type becomes really useful when we have skin templates defined in topics, because we can now use it to delimit content that should be _displayed when the topic is viewed normally_, but _removed when the templates are instantiated_.
The alternative comment type becomes really useful when we have skin templates defined in topics,
because we can now use it to delimit content that should be _displayed when the topic is viewed normally_, but _removed when the templates are instantiated_.

or example, we might have templates in a topic like this:
<verbatim class="tml">
%TMPL:DEF{"example"}%
#{ This comment will always be removed }%
#{ This comment will always be removed }#
%{ This comment will be removed when the template is instantiated }%
Example
%TMPL:END%
</verbatim>

When we view the topic, we'll see:

<pre>
%<nop>TMPL:DEF{"example"}%
#{ This comment will always be removed }%
#{ This comment will always be removed }#
%{ This comment will be removed when the template is instantiated }%
Example
%<nop>TMPL:END%
</pre>
but all comments will be removed when the template is actually used.

#FindingTemplates
Expand Down Expand Up @@ -375,12 +378,12 @@ see what PatternSkin defines.

%STOPINCLUDE%

%META:FILEATTACHMENT{name="oopsmore_diff_debug.gif" attr="h" comment="" date="1490476899" size="3205" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="default.css.gz" attr="h" comment="" date="1490476899" size="2072" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="base.css.gz" attr="h" comment="" date="1490476899" size="1331" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="oopsmore_diff_sidebyside.gif" attr="h" comment="" date="1490476899" size="1994" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="base_src.css" attr="h" comment="" date="1490476899" size="6780" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="base.css" attr="h" comment="" date="1490476899" size="5196" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="oopsmore_diff_sequential.gif" attr="h" comment="" date="1490476899" size="3464" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="default_src.css" attr="h" comment="" date="1490476899" size="11093" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="default.css" attr="h" comment="" date="1490476899" size="8209" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="oopsmore_diff_debug.gif" attr="h" comment="" date="1506603718" size="3205" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="default.css.gz" attr="h" comment="" date="1506603718" size="2072" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="base.css.gz" attr="h" comment="" date="1506603718" size="1331" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="oopsmore_diff_sidebyside.gif" attr="h" comment="" date="1506603718" size="1994" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="base_src.css" attr="h" comment="" date="1506603718" size="6780" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="base.css" attr="h" comment="" date="1506603718" size="5196" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="oopsmore_diff_sequential.gif" attr="h" comment="" date="1506603718" size="3464" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="default_src.css" attr="h" comment="" date="1506603718" size="11093" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="default.css" attr="h" comment="" date="1506603718" size="8209" user="ProjectContributor" version="1"}%

0 comments on commit 58ae72c

Please sign in to comment.