I tried to modify the "exists"-template so that after this template has checked whether a page exists or not, another template (a template with preload-parameter for a new page or a template without preload-parameter for an existing page) is returned:
=> The original qif-code of the {{exists}}-template is: {{qif |test={{booleq |1=[[{{ucfirst:{{{1|defaultFalse}}}}}]] |2={{:{{{1|defaultFalse}}}}} }} |then={{{else|false}}} |else={{{then|true}}} }}
=> I tried to adapt this into: {{qif |test={{booleq |1=[[{{ucfirst:{{{1|defaultFalse}}}}}]] |2={{:{{{1|defaultFalse}}}}} }} |then={{{else|{{hotspot || Image = image-name.gif | Link = name-of-the-page |Preload=Template:templatename | Heigth = 81px}}}}} |else={{{then|{{hotspot-no-preload || Image = image-name.gif | Link = name-of-the-page | Heigth = 81px}}}}} }}
Unfortunately, I want to apply this to several different images, each of which links to a different page so i should have to put this qif-code into different {{exists}}-templates so that each of these different {{exists}}-templates then contains its own "image-name.gif"-reference and "name-of-the-page"-link. This is not efficient because lots of {{exists}}-templates have to be made.
A little bit more efficiently: I could put this qif-code on the wiki each time such an image should be displayed, but i do not understand how the name-of-the-page-parameter can be passed to this qif-code without referring to a global template like {{exists|name-of-the-page}}. What i mean is that when the {{exists}}-template is used, the parameter is passed by {{exists |name-of-the-page}} and then the qif-code knows which page to check. What i would like to accomplish now, is to adapt the qif-code so that i can manually define in the qif-code which page should be checked for existence.
In short: how do i adapt the above qif-code, so that it knows what page to check for existence, without passing the name-of-the-page-parameter via {{exists|name-of-the-page}}??
Thanks a lot in advance!
JAN
2006/4/5, Minh Nguyen mxn@zoomtown.com:
Yes, I think there is: the English Wikipedia has an "exists" template http://en.wikipedia.org/wiki/Template:Exists to check if a particular page has been created yet.
Jan Vanoverpelt wrote:
2006/4/4, Jan Vanoverpelt
Thank you all for the help: it works now!
...BUT 1 practical problem is still there: Scenario:
- The user clicks on an image, which refers to a non-existing page.
- The user is linked to the non-existing page's edit-box in which the
preloaded text is written. 3) The user adds some additional text and saves the page. 4) The user leaves the pages, surfs around on the wiki and goes back
to the
image through which he previously created the new page. This is the
point
where the practical problem jumps in: the user clicks on the image,
BUT he
is AGAIN taken directly to the edit-box INSTEAD OF being taken to the
actual
page (which exists now, so he does not have to be linked directly to the edit-box of the page).
I think this problem is due to the fact that i have created some kind of "hard link" behind the image, so that the user is always forced to go directly to the edit-box with the preloaded text in it. Is there a way
to
fix this, so that the user (after he/she visited the non-existing
page for
the first time, added something and saved it) is directly taken to the actual page the second time (like is done in case of "normal" links) ??
Thanks!
JAN
-- Minh Nguyen mxn@zoomtown.com AIM: trycom2000; Jabber: mxn@myjabber.net; Blog: http://mxn.f2o.org/
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l