Community Central

Forum:Possible to call part of PAGENAME?


Possible to call part of PAGENAME?

Forum page

19,673pages on
this wiki
Add New Page

This Forum has been archived

Visit the new Forums
Forums: Index Support Requests Possible to call part of PAGENAME?
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 1758 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Say the {{PAGENAME}} is "Netgear WNDR3400 1.0", is it possible to call {{PAGENAME}} and it only display "Netgear"?WifiShadow 14:51, July 6, 2012 (UTC)

{{#explode:{{PAGENAME}}| |0}}
1st param is string, 2nd is what to split by (space), 3rd is which slice you want (0=Netgear, 1=WNDR3400, 2=1.0). MediaWikiWiki:Extension:StringFunctions. Lunarity 17:58, July 6, 2012 (UTC)
hmmm, I must be missing something, I see it works here, but on my wiki the result is "{{#explode:Netgear WG511 3.0| |0}}" Seems {{PAGENAME}} works but not explode. WifiShadow 20:00, July 6, 2012 (UTC)
Odd. It works on the Wikia wiki I contribute to. Maybe an Admin disabled the StringFunctions extension (somehow) on yours? You can try this which should do the same thing (still using string functions though):
{{#sub:{{PAGENAME}}|0|{{#pos:{{PAGENAME}}| }}}}
If that doesn't work either then there are nasty template tricks to implement StringFunctions using ParserFunctions instead but those are slow, ugly and easily broken; you should check if StringFunctions is enabled and get it turned on if it isn't. [StringFunctions is part of ParserFunctions on newer MediaWikis] Lunarity 03:45, July 7, 2012 (UTC)
Not sure if this is what you want but can't you just do this? [[{{PAGENAME}}|Netgear]] The only downside to this is that it makes the pagename bold. Essiw 11:38, July 7, 2012 (UTC)
Try {{#explode:{{PAGENAMEE}}|_|0}}. It parses the page title (with underscores). Using spaces for this will not work because leading and trailing whitespace is ignored, so a space as a parameter will be treated as an empty string. AIFW speak to the boss (uncyc) 19:26, July 7, 2012 (UTC)

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.