Template:GetSubpage: Difference between revisions
From Karteria DWRP Wiki
Jump to navigationJump to search
Created page with "{{#ifeq:{{BASEPAGENAME}}|{{FULLPAGENAME}}|{{FULLPAGENAME}}|{{#invoke:String|sub|{{{1}}}|{{#expr:{{#invoke:String|len|{{BASEPAGENAME}}}}+2}}}}}}" |
No edit summary |
||
| Line 1: | Line 1: | ||
{{#ifeq:{{BASEPAGENAME}}|{{FULLPAGENAME}}|{{FULLPAGENAME}}|{{#invoke:String|sub|{{{1}}}|{{#expr:{{#invoke:String|len|{{BASEPAGENAME}}}}+2}}}}}} | <includeonly>{{#ifeq:{{BASEPAGENAME}}|{{FULLPAGENAME}}|{{FULLPAGENAME}}|{{#invoke:String|sub|{{{1}}}|{{#expr:{{#invoke:String|len|{{BASEPAGENAME}}}}+2}}}}}}</includeonly><noinclude> | ||
{{Documentation}}</noinclude> | |||
Revision as of 13:00, 9 January 2026
Returns the subpage portion of given text eg: {{GetSubpage|Test Drive Meme - March 2025/FAQ Page}} gives Meme - March 2025/FAQ Page
Use category to return the name portion of a category eg {{GetSubpage|Category:Test Drive Meme|category}} gives st Drive Meme
Gives the subpage portion of the provided text
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Page name to retrieve the subpage from | 1 | no description | Page name | required |
| type | 2 | if "category" extracts the name of the category
| String | optional |