Jump to content

Hiding inactive fields in a template


Werthead

Recommended Posts

This is actually for the TV wiki, but since the TV wiki thread appears to have vanished and Wikia uses the same template system as Wiki (or so I gather), I thought I'd ask the question here. We have a 'character template' which works very well (we totally nicked it from the True Blood wiki, but that's okay as there's a crossover of people working on two wikis) but we can't figure out how to hide the unused fields. So if a character's date of birth is not known, we want to leave the field blank and then just have it not appear on the character page.

What is baffling us is that the template works exactly like this on the True Blood Wiki, but the template on the GoT one doesn't. There's no special sub-templates or anything that TBW has and GoTW doesn't, so as far as I can tell there is no reason at all for it not to work.

Example: the Tyrion Lannister page has the inactive fields (like 'Age') appearing even when not included in the code. The Eric Northman page on TB has the inactive fields (like 'Also Known As') missing when not used, which is what we want. I can't make head or tail why the two identical templates on two Wikis on the same site are acting differently. It's weird. Any ideas?

Link to comment
Share on other sites

No idea. I made a small change to see it this would fix it but no success (undid the change thereafter).

The structure of the template is a bit different then the one were are using and I can't read where it should see that no value for a parameter is supplied. Probably with hidden tag.

I think this tag uses new software / extensions. Could it be that you have to activate the use of these extensions on your wikia?

Link to comment
Share on other sites

No idea. I made a small change to see it this would fix it but no success (undid the change thereafter).

The structure of the template is a bit different then the one were are using and I can't read where it should see that no value for a parameter is supplied. Probably with hidden tag.

I think this tag uses new software / extensions. Could it be that you have to activate the use of these extensions on your wikia?

That's what I'm thinking. The TB Wiki has something enabled that we don't. The problem is that going through all the templates and features of both wikis (the chief admin, though not the creator, of the TB Wiki is working on the GoT one as well, though he's as stumped as I am) there doesn't seem to be anything they have that we dont. Will go through it again and see if something turns up. I think it may be related to the 'hiddenStructure' command so I'll investigate down that road.

Link to comment
Share on other sites

Ah, 'hiddenStructure' is apparently a CSS hack which WikiMedia discourages the use of as it doesn't work on certain Linux-based browers. It is disabled in Wikipedia itself and by default in new Wikias. TB Wiki must have it enabled, but I don't know how. Will see if there's a way of doing it. WikiMedia recommends using HTML instead, but we're going past my level of coding ability here :P

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...