Namespaces & Templates

Discussion in 'ARRSEpedia' started by Bad CO, Jun 15, 2007.

Welcome to the Army Rumour Service, ARRSE

The UK's largest and busiest UNofficial military website.

The heart of the site is the forum area, including:

  1. Bad CO

    Bad CO LE Admin Reviews Editor Gallery Guru

    I've just been looking at all the good work that has been done on Honours, Awards & Decorations. Unfortunately a little bit of confusion appears to have arisen about the best way to use Templates.

    You're not really meant to link into a template page (i.e [[Template:Whatever|Whatever]]. Rather you should include the template in 'proper' pages using the {{Whatever}} tag to get a standard look across multiple pages.

    You can also embed templates within other templates which is what I've done with the Template:Honours, Awards and Decorations page. This means that cutting and pasting vast quantities of duplicate code into multiple pages is unnecessary and also you can change a template from a single page ....

    Hope that makes sense?
  2. Bad CO

    Bad CO LE Admin Reviews Editor Gallery Guru

    Oh you also don't need to use the [[Category:Whatever]] on a page that has the category already included in the template.
  3. Cheers BCO - I was going to start on this tonight and fix it all, so you've saved me a job.

    Bl00dy gleaming effort by the way JuniorBloke - lots more please. Don't mind BCO - he's just a grumpy sod! :D
  4. Ok lets see if I can get my non wiki head round this, in the changes the Boss has made he has:

    1. Recreated the original H,A & D template with all the sub templates down as pages instead of redirect|links.

    2. Then created a sub template, say honours, embedded the H,A & D template in that and saved it.

    3. Then created a honours page and placed the honours template in that so it linked back to the original H,A & D template - Or have I missed something??

    I can see that I possibly over-reached myself in an excess of (youthful) enthusiasm for a job that was obviously way beyond my wiki ability (as I think Darth pertinently pointed out), even with the help of others way more experience (cheers FB & RH). But I must confess to being impressed that it even worked. Though I now realise that Wiki purists must have been cringing at the bastardisation of what was done to make it work, but isn't that what were supposed to be good at.... adapt and overcome.

    Or maybe I should just wind my neck in and stick to Dead Ending , Orphans & Cattting.

  5. Nah - just stick with and keep ploughing on - it's the only way to learn how to do it! If you're that concerned about messing up consistently, you may wish to consider the use of a 'Sandbox' to try things out and make sure it all works. If you want your own, go to my Userpage and see how to set one up! :D
  6. Cheers Proximo.

    Looked for your home page to check out the sandbox feature... but cant seem to find it :oops: :oops:

    Do you have a different User Name on the ARRSEpedia??.

    More importantly was my understanding of the changes the Boss made correct?

  7. Of course I do - it's me! :D

    Click here and scroll down to 'My Sandbox'. You should be able to see the code needed if you would like something similar...
  8. Thanks for that , "nods as good as a wink to a blind man", he says groping for white stick :)

    Hmmmm ..... only one person I know in that list who has a personalised sandbox, seem to remember rooting around in it a day or three ago, in a nice, non cat like way, of course.

    Do I get a shiny new penny if I manage to guess correctly and snaffle the code??

    Or this being ARRSE are prizes restricted to puppies and sweeties.

  9. Bad CO

    Bad CO LE Admin Reviews Editor Gallery Guru




    No - the honours page now has both templates on it because it has {{honours}} and {{honours}} has {{H,A&D}} embedded in it.

    Not at all - great first effort and one that I thoroughly commend. Your wiki powers are growing stronger every day, young Padwan .......
  10. Bad CO

    Bad CO LE Admin Reviews Editor Gallery Guru

    Slightly separate but related issue, I thought I'd put in a bit about categories in templates.

    When you create a template you want the template to appear in the category of templates( i.e [[Category:Templates]]. However you do not want pages which use that template to appear in [[Category:Templates]]. This is achieved by using the <noinclude> </noinclude> tags, ie

    <noinclude>[[Category: Templates|Honours]]</noinclude>
    Similarly you want every page that uses a particular template to appear in a certain category, i.e every page that uses {{Honours}} to appear in [[Category:Honours]]. However you do not necessarily want the Template to appear in the category. This is achieved using the <includeonly> </includeonly> tags, i.e

    As always further detail can be found on MediaWiki
  11. Ok Boss, think I follow that but can you indulge me a tad more please, I'm struggling with this last bit:

    In this bit I understand that the {{H,A&D}} is embedded in {{honours}} and therefore links, but I thought that the Honours page was linked directly back to the {{H,A&D}} by the use of [[Honours]] in the {{H,A&D}}, cos, if I understand what you've done you couldn't have {{Honours}} or any of the {{others}} in the {{H,A&D}} without the use of an alias.

    So in effect all the pages set up to carry the {{templates}} are in fact carrier vessels that just prevent the use of an alias in the {{H,A&D}} :? :?

    Or am I just totally confused and talking shite?


    edited for being a bigger mong than usual
  12. Bad CO

    Bad CO LE Admin Reviews Editor Gallery Guru

    Actually my first explanation wasn't very correct. Should have read:

    I hope that makes sense?

    There is no link in any of the pages to [[Template:Honours, Awards and Decorations]] as there should be no need for any of the content pages, i.e [[Honours]], [[Gallantry Awards]], etc to link back to it. Template pages exist purely to allow standard text (such as navigation aids) to appear on several pages. They are not supposed to be "read" as content pages.

    So your last sentence is correct although really the content pages ([[Honours]], [[Gallantry Awards]], etc) should have more content than just the {{template}} in them.

    Hope that makes sense!