+ Reply to Thread
Results 1 to 2 of 2

Thread: {{pagename}}

Share/Bookmark
  1. #1
    Junior Member kforrest is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    11
    Rep Power
    1

    Default {{pagename}}

    Does anyone know if it is possible to use {{PAGENAME}} to get the page name but cut off the last few characters?

    For example, if I had a page that had the name: Big Article

    {{PAGENAME}} = Big Article

    But lets say you wanted to cut off the last 4 characters to return: Big Art


    Anyone know if there is a way to do that?



    K

  2. #2
    Junior Member Woelkm is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    26
    Rep Power
    1

    Default

    Yes you can if you combine Magic words like {{PAGENAME}} (which returns a string) with the extension "String Functions" and/or "Parser Functions" look for them in the extension matrix on mediawiki.org. Both of them are pretty usefull.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. {{pagename}} -> {{previouspagename}}
    By error in forum MediaWiki General Discussion
    Replies: 4
    Last Post: September 22nd, 2009, 05:36
  2. Replies: 1
    Last Post: September 12th, 2009, 21:32
  3. work-around for {{Languages|{{PAGENAME}}}}
    By cpages in forum Wiki Editing
    Replies: 6
    Last Post: March 4th, 2009, 01:34
  4. Hook to change pagename at creation
    By phkoech in forum Customizing MediaWiki
    Replies: 1
    Last Post: April 25th, 2008, 09:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts