Template:GetSubpage/doc: Difference between revisions

From Karteria DWRP Wiki
Jump to navigationJump to search
Icie (talk | contribs)
No edit summary
Icie (talk | contribs)
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Returns the subpage portion of given text eg: <nowiki>{{GetSubpage|Test Drive Meme - March 2025/FAQ Page}}</nowiki> gives  
Returns the subpage portion of given text eg: <code><nowiki>{{GetSubpage|Test Drive Meme - March 2025/FAQ Page}}</nowiki></code> gives <code>{{GetSubpage|Test Drive Meme - March 2025/FAQ Page}}</code>
{{GetSubpage|Test Drive Meme - March 2025/FAQ Page}}
 
Use <code>category</code> to return the name portion of a category eg <code><nowiki>{{GetSubpage|Category:Test Drive Meme|category}}</nowiki></code> gives <code>{{GetSubpage|Category:Test Drive Meme|category}}</code>
 
<templatedata>
<templatedata>
{
{
Line 6: Line 8:
"1": {
"1": {
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": true
"required": true,
"label": "Page name to retrieve the subpage from"
},
"2": {
"label": "type",
"description": "if \"category\" extracts the name of the category",
"type": "string",
"suggestedvalues": [
"category"
]
}
}
}
},
"description": "Gives the subpage portion of the provided text"
}
}
</templatedata>
</templatedata>

Latest revision as of 05:33, 16 January 2026

Returns the subpage portion of given text eg: {{GetSubpage|Test Drive Meme - March 2025/FAQ Page}} gives FAQ Page

Use category to return the name portion of a category eg {{GetSubpage|Category:Test Drive Meme|category}} gives Test Drive Meme

Gives the subpage portion of the provided text

Template parameters

ParameterDescriptionTypeStatus
Page name to retrieve the subpage from1

no description

Page namerequired
type2

if "category" extracts the name of the category

Suggested values
category
Stringoptional