Jump to content

Recommended Posts

<includeonly>__NOTOC__<includeonly><INSERT TEMPLATE CODE HERE WITHOUT ANY SPACES OR LINE BREAKS></includeonly><noinclude>__NOTOC__
...
</noinclude>

Looking at the first line of code, it looks as if the initial includeonly and __NOTOC__ are redundant?

Link to comment
Share on other sites

47 minutes ago, Greg said:

<includeonly>__NOTOC__<includeonly><INSERT TEMPLATE CODE HERE WITHOUT ANY SPACES OR LINE BREAKS></includeonly><noinclude>__NOTOC__
...
</noinclude>

Looking at the first line of code, it looks as if the initial includeonly and __NOTOC__ are redundant?

No, the first one is transcluded onto the page where the Template is called, and the second prevents TOC on the Template page itself.

Anything inside 'includeonly' tags is transcluded. Inside the 'noinclude' is not transcluded. It is arguable that they both need to be present, but we do it due to situations where we got unexpected results. There is also an 'onlyinclude' tag that we never use and may be better, but I have never tested explicitly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, Privacy Policy, and Terms of Use.