Fandom

Community Central

Admin Forum:Passing variables from one template to another

19,011pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

This Forum has been archived

Forums: Admin Central Index Technical Help Passing variables from one template to another
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.


Okay, here's a puzzler for people who understand conditional tables better than I do. I have a template called tardis:template:job table. It's kind of a "gestalt" template, in that it passes certain bits of its output through other templates through SMW, and then re-assembles the output of those templates into a completed table. What I need is to somehow get a variable called {{{label}}} to be passed from tardis:template:job table to tardis:template:job table head.

In other words, a person types {{job table|label=This is a custom table header}}. Somehow, I then need to get "This is a custom table header" to the part of {{job table head}} of my choosing, because {{job table head}} creates the table headers for the table that ultimately gets re-assembled by {{job table}}.

Is this sort of thing even possible? Can you use one template to pass a variable to another template? czechout@fandom    fly tardis  <span style="">15:05: Tue 15 May 2012 

Template:B
B says: ''{{{1}}}''
Template:A
{{B|{{{1}}}}}
Page AB
{{A|sure, why not}}
Result:
B says: sure, why not
 pecoes  15:54, May 15, 2012 (UTC) 
If you go by SMW:Help:Template format, it is not possible.--PedroM 16:13, May 15, 2012 (UTC)

Also on Fandom

Random Wiki