Template talk:Wikitravel
From Wikipedia, the free encyclopedia
Contents |
[edit] Usage
- {{wikitravel}} - where the PAGENAME matches Wikitravel's page
- {{wikitravel|Atlanta}} - set the parameter to match Wikitravel's page name.
[edit] See also
- Wikitravel
- Template:Wikitravelpar
- Template:Wikitravelphrasebook — for linking to Wikitravel phrasebooks
[edit] Parameterized variant?
Is there a variant of this template that lets the user specify a name? For example:
{{Wikitravel|Chicago, Illinois}}
There are occasions when the wikitravel pagename is not the same as wikipedia's, and also this would let the wikipedia article change its name without affecting the link. -Wikibob | Talk 01:01, 2005 Apr 20 (UTC)
- Exactly, like in the case of Seattle. What if we take the same templete of Template:Commons? In its page it looks broken, but it works perfectly for chaging the target. Nova77 15:18, 23 Apr 2005 (UTC)
The idiomatic method is to create a new template along the lines of Template:wikisourcepar, Template:wiktionarypar, Template:wikiquotepar, which in this case would be Template:wikitravelpar. However, given that Wikitravel isn't actually a Wikipedia sister project, I'm opposed to the whole idea. What's next — Template:Amazon and Template:eBay? --Quuxplusone 21:27, 17 Jun 2005 (UTC)
- Done. I create Template:wikitravelpar. Quuxplusone, if you don't like it then TFD it and we'll see what everyone thinks. :) Cburnett 05:53, Jun 21, 2005 (UTC)
-
- Template:Wikitravel has already been TFD's once (in Oct 2004, although it seems to be missing from the logs?) and survived — under the condition that it doesn't attempt to emulate a Wikimedia project. I don't think a blue color is enough for this. Jpatokal 08:32, 21 Jun 2005 (UTC)
-
-
- I agree. I have noticed its being reverted to the IMDb-style template several times now (not by me); who keeps putting it back to the sister-alike version? --Quuxplusone 16:28, 21 Jun 2005 (UTC)
-
-
- Template:Wikitravelbyname has existed since October of last year, and is fairly widely used. Why do we need another template to do the same thing?. -- Chris j wood 11:25, 21 Jun 2005 (UTC)
-
-
- I didn't know it existed. (Document these things before they're asked for! :) But it is standard Wikipedia style to use 'par' (parameter) for this kind of template; viz. Template:Wiktionarypar, Template:Wikiquotepar, Template:Wikisourcepar. So I strongly suggest moving that template. It will make it much easier for newbies to find without having to visit WikiProject Wikitravel or wherever the documentation for this project is hiding. --Quuxplusone 16:28, 21 Jun 2005 (UTC)
-
[edit] Wikitravel is not a Wikimedia project
Wikitravel is not a Wikimedia Foundation project. The boxed logo style external links should be restricted to "in the family" projects only. If this template appears on a page with a commons box, for example, it makes it appear to be to a project with the same standing as Commons, which is misleading. Gentgeen 16:47, 21 Jun 2005 (UTC)
- Right. I see it's been rv'ed to the correct version again. But it really shouldn't have the
*
in front of it, if it's supposed to match the other external-link templates listed at Wikipedia:Template messages/Links. It will be a major undertaking to remove the asterisk from the template and add it in all the articles; I'll start this afternoon (if there's no convincing objection), but some help would be appreciated. --Quuxplusone 17:28, 21 Jun 2005 (UTC)
- I'm afraid I strongly disagree with you, Gentgeen. First off I'd like to point out the fact that template:wikicities has been allowed to keep it's box design and Wikitravel isn't 'part of the family'. To be honest as long as this template has it's blue backround and a link to what Wikitravel is, people should be quite capable to figure out that it's not part of Wikimedia. And to be honest, all Wikis were created rather equal. Especially when for the most part they're all running off nearly indentical software.--Aaron Einstein 01:37, Jun 25, 2005 (UTC)
-
- Template:Wikicities has now been reverted to the last, non-boxed version, and a note left on the talk page. Thanks for noticing. --Quuxplusone 06:44, 25 Jun 2005 (UTC)
[edit] Amended to use wikitravelpar
I've amended the implementation of this template to use Template:wikitravelpar whilst preserving the usage. This way, the next time somebody decides to change the formatting, we only have one place to change and less possibility of inconsistencies between the versions. -- Chris j wood 11:16, 22 Jun 2005 (UTC)
- I've undone this and instead redirected Wikitravelpar here, because using default parameters, we can now merge the functions into this one template, which has the more natural name (without the "par"). See the #Usage above. -- Netoholic @ 17:57, 31 January 2006 (UTC)
[edit] Destinations prefixed by 'the'
A handful of destinations such as the Central African Republic and the Czech Republic are identified with the definate article 'the'. The current template does not reflect that, so these destinations get expanded as below:
- Travel guide to Central African Republic from Wikitravel
- Travel guide to Czech Republic from Wikitravel
The resulting text should include the word 'the'. Is there a way to rectify this? --Bletch 16:46, 14 July 2005 (UTC)
- Two options I see:
- Travel guide: "Central African Republic" from Wikitravel
- Central African Republic - a travel guide from Wikitravel
- I'm also fine with the "grin and bear it" approach. -- Netoholic @ 17:57, 14 July 2005 (UTC)
-
- I favor the latter approach. --Bletch 19:13, 15 July 2005 (UTC)
[edit] Why place name in italics?
I would prefer the place name not to be in italics. Italics is traditionally used for emphasis, for words from other languages and for book and film titles, but not for place names. I wrote a book about New York City. This looks strange. AxelBoldt 18:28, 31 January 2006 (UTC)
[edit] Linking Wikitravel
Netoholic, would you care telling why do you think linking to our article about Wikitravel is a bad thing ? This is done with dozens of other External Link templates. bogdan 17:46, 1 February 2006 (UTC)
- It is also not done with dozens of other templates. Linking to our article in this template will clutter up Special:Whatlinkshere/Wikitravel, which makes Wikipedia less useful for people researching Wikitravel (the website) as they have to sift through eventually thousands of links from place names, rather than finding information on the website. Perhaps we should start extending this to other templates as a standard? -- Netoholic @ 18:15, 1 February 2006 (UTC)
-
- It seems to me that "Wikitravel" should best point to wikitravel:Main Page, rather than wikitravel:Wikitravel:About. --ESP 03:24, 15 February 2006 (UTC)
[edit] Travel guide to X -> X travel guide
I find the "Travel guide to X" format a little stilted. Barring objections, I'm going to switch this to "X travel guide". --ESP 18:02, 11 May 2006 (UTC)
[edit] Need more generality
I have a case where neither Wikitravel nor Wikitravelpar seem to fit. I just used this template in the External Links section of the Cebu web page as { { wikitravel|Cebu (island) } }. This produces what I think is a very ugly looking link something like the following:
Cebu (island) travel guide from Wikitravel
I would prefer to be able to separately specify the text to be shown in the link and the actual wikitravel page name. I am not (yet) writing templates myself, but I suspect that this could be done similarly to the way the citation templates are parameterized. -- Boracay Bill 06:22, 25 September 2006 (UTC)
- Playing around a bit, I came up with the following:
[[wikitravel:{{{1|{{PAGENAME}}}}} | {{#if:{{{2}}}|{{{2}}}|{{{1|{{PAGENAME}}}}}}} travel guide]] from [[Wikitravel]]
-
- With zero or one parameter, it works like the current wikitravel template.
- With two parameters, it links in Wikitravel to the first and labels the link with the second.
- Supplying null or blank parameters produces unintended results. -- Boracay Bill 03:47, 26 September 2006 (UTC)
[edit] Potential problem, and a proposal
I had thought to suggest replacing the current wikitravel template with the backwards-compatible template discussed in the preceeding section. On reflection, however, I think that there is a potential problem with the current template which that would not correct.
The potential problem which I see is that the current wikitravel template produces a fragile link if used with zero parameters. The link will be broken if either the wikitravel page or the wikipedia page is renamed. I am a bit sensitive about page naming as I have recently observed that page naming for cities and provinces in the Philippines does not follow consistent naming conventions, and the page names used are sometimes confusing. That is a side-issue, but it could lead to page renaming which would break wikitravel template links on the renamed pages.
Also, AFAICT, Section 4 above - "Wikitravel is not a Wikimedia project" - is still an outstanding unaddressed problem. I have addressed that below.
I see the following as a solution to this problem:
- Create a replacement (proposed code provided below) for the wikitravel template which treats use with zero parameters as an error condition. Name it (e.g.) wikitravelpage.
- Deprecate the wikitravel template.
- Convert existing uses of the wikitravel template to use the replacement wikitravelpage template instead. This could be done with a bot.
- Remove the deprecated wikitravel template. If a bot was used to do the template usage conversion, discontinue its use subsequent to removal of the wikitravel template.
Following is proposed code for the replacement wikitravelpage template. This produces a non-boxed tag which can optionally be labeled with something other than the tag name. It treats use with zero parameters as an error condition, similar to what the cite web template does if invoked with zero parameters.
{{#if: {{{1|}}}| [http://wikitravel.org/en/{{{1}}} {{#if:{{{2|}}}|{{{2}}}|{{{1}}}}} travel guide] from [[Wikitravel]]| '''Error on call to [[Template:wikitravelpage]]: Parameter 1 must be specified''' }}<noinclude><niwiki> *Usage: :1. {{wikitravelpage Boracay}} - link to wikitravel's page on Boracay :2. {{wikitravelpage Boracay|Boracay Island}} - ditto, but label it Boracay Island </nowiki>
Comments? -- Boracay Bill 05:58, 27 September 2006 (UTC)
- FYI, the conventional solution as I understand it would be to keep the current Template:wikitravel as it is, and create a new Template:wikitravelpar along the lines of what you have above. (The "par" stands for "parameter".) Also, either you're missing a couple of pipe characters in your sample usages, or your template is really funky-weird and ought to be changed to work like normal templates: {{wikitravelpar|Boracay|Boracay Island}}. Hope this helps! --Quuxplusone 03:50, 28 September 2006 (UTC)
Thank you for your comments.
I had seen the wikitravelpar template, which was used in section 5 above and which currently redirects to to wikitravel. I proposed the complicated migration procedure described above because my proposed replacement template would deliberately not have been backwards compatible with the current wikitravel template; I removed support for invocation with zero parameters because I felt that links thus produced are excessively fragile. I thought that I had explained that sufficiently, but perhaps not.
Perhaps that was too big a step. Let me propose an alternative wikitravel replacement which is backwards compatible with the current wikitravel template with the difference that this new one (1) produces non-boxed links and (2) adds support for an optional second parameter.
[http://wikitravel.org/en/{{{1|{{PAGENAME}}}}} {{#if:{{{2}}}|{{{2}}}|{{{1|{{PAGENAME}}}}}}} travel guide] from [[Wikitravel]]
- Usage:
- 0 arg: {{wikitravel}} - link to wikitravel page matching this page name
- 1 arg: {{wikitravel|Boracay}} - link to wikitravel's page on Boracay
- 2 arg: {{wikitravel|Boracay|Boracay Island}} - ditto, but label it Boracay Island
Would it be appropriate for me to break the wikitravelpar redirection and place my proposed replacement template there, with an announcement that barring objection I intend to move the replacement code to the wikitravel template in X number of days? (The actual proposed replacement code differs slightly from the above, and can be seen at User:Wtmitchell/Draft1. My test cases can be seen at User:Wtmitchell/Draft2.)
Regarding your comment that my template code is really funky-weird and ought to be changed to work like normal templates, I am new to template coding and looked mainly at Help:Template, at ParserFunctions, and at Template:cite_web for an example of handling of error-case invocation without a required parameter. Can you point me at a Help page describing what "normal templates" ought to look like? -- Boracay Bill 08:47, 3 October 2006 (UTC)
[edit] Template:wikitravelpar replaced with proposed new code
Having seen neither objection nor guidance to the contrary, I have replaced the Template:wikitravelpar redirection to Template:wikitravel with my proposed new wikitravel template, as was discussed above. If I see no objection over the next week or so, I plan to replace the wikitreavel template and restore the reidrect.
Note that this affects a number of currently-active pages which use the wikitravelpar template (e.g., Nagoya. -- Boracay Bill 02:08, 9 October 2006 (UTC)
[edit] Template:wikitravel replaced with new code
Having seen neither objection nor guidance to the contrary, I am replacing Template:wikitravel with my new code discussed above and restoring the the Template:wikitravelpar redirection to Template:wikitravel. -- Boracay Bill 23:58, 15 October 2006 (UTC)