Forum:Geting a preload template to show and how to pass a title to it

A slightly complex one for the real experts to solve. (or have i missed some simple solution or add on to help me) ?

quiery has been re phrased sightly to try to make it clearer, as requested

I currently have a series of templates that preload another template when used in place of a normal link to create a new page and then it 'appears' as a normal blue link to the page. This is the one to create a new page using a registation number passed to it [http://tractors.wikia.com/wiki/Template%3ACreate_reg-no. here] with a page using it Here - some of the linked pages exist (blue) and others do not (red)+ rather than a standard wiki link. - this was created from one on the German wikibooks site traktorenlexikon. The version I have created works but:-

1) - I also need a version (or something similar) to create a table as a template page that is then trancluded in to the page that the link to create it is placed on (the resulting tables being on a separate template page for several reasons - listed latter). See this page Here for an example of its use & the resultant table (transcluded version is below the photos, with the create link higher up the page - the PML Table template page is currently linked as a template so that it shows,as an example).

Currently the {create pml truck} template acts as a link, rather than transcluding the table as I would like once it has been created. (I can get the resulting table page to transclude by using a template link, as shown below it), but that is not ideal,as I may as well just create the pages by copy and paste instead of putting in the create link creating the table then gong back and changing to a template link for the new page.

2) - The other problem is the create pml truck template, needs to fill in the (new) template when creating it and fill in the table header to match the name passed to create the template, but without the PML prefix that the template is given as part of its name (as using {PAGENAME} within the template does not work to do it) but {PAGENAME} does work to create the TNAVBAR edit links for the new template page.

3) - Or suggest an alternative solution to creating the outline (pml) tables for each vehicle make / model page without having to copy and paste and customise each one manually via a red link is what Im trying to achieve. The tempalate will become a template within another preloaded outline template page for the different manufacturers and model pages,which can then be created when a user has some data to add.

Note: = I want to keep them (the PML tables) on separate pages from the articles they are used in for several reasons - potential size - table editing issues (editing errors corrupt them) - control (table can be protected if required) - re use else were - reduce article size - reduce edit clashes in the articles & chance of data loss.

Here is a page with a different version of the PML table in use in a page - Fowler, which as you can see the table is getting very long & may reach 500 + entries. But other pages may just reach a couple of lines as few vehicles survive from the manufacturer, or for particular model.

4) - Is it possible to nest several of these tables on the manufacturers pages? (like the Navbox with sub groups template in a wrapper for several subgroup Navboxes). - so that individual model table pages is also displayed within the manufacturers page in one big PML table (probably collapsible). PML="Preserved Machine List"

Suggestions please - BulldozerD11 00:29, April 22, 2010 (UTC)


 * Above has been re write to try to make it clearer - BulldozerD11 17:00, April 22, 2010 (UTC)


 * Sounds incredibly complicated. Why not just use SMW + SF? You can ask staff to activate them with Special:Contact. 19:30, April 22, 2010 (UTC)


 * Hi Ose I have probably made it sound more complicated than it is.


 * I've heard of 2 extension you mention but am uncertain which if any would work best & the basics of the site are fairly well developed, so migrating nearly 3000 pages + templates could be a big job. I've seen a few different ways of doing page creation and import forms on various wikis but actually getting one to work for me is proving tricky to implement. 'my' Wiki is a database of sorts combined with the encyclopaedia of wikipedia. The data structuring of SMW has some merit & the form based structure of SF could be usefull, but which is better suited to my application. - BulldozerD11 22:40, April 22, 2010 (UTC)


 * Update after lots of trials I think I've cracked part of the problem. If the 2nd template exists it is now transclude OK so the table now shows on the page.


 * The outstanding part to fix is the passing of name from the article page > the heading of the table in the transcluded template page. The issue is that using {PAGENAME} will not work as that adds the prefix that is added when the page (template) is created. Read through the Mediawiki help pages but no joy making sense of it. Tryed various forms of subst:


 * current code for "template:create pml truck" is;


 * Note: - fullurl: will not work inplace of {{localurl:


 * So how do I get the value of into "project:PML Truck" which then becomes "template:PML  " each time the time the {{create pml truck|{{{1}}}}}} is used in a page. (the reason for not using the articles name but a optional name is some pages may have several on so would need different names).


 * The output template needs to contains the heading "|+ List of preserved {{{1}}} trucks" were one is replaced by the name passed to the first template to create the new templates title.


 * - BulldozerD11 21:11, April 24, 2010 (UTC)