Greg Posted August 2, 2021 Posted August 2, 2021 <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?
z929669 Posted August 2, 2021 Author Posted August 2, 2021 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now