Template:Codesample-header
{{{1}}}
This template uses TemplateStyles: |
Usage
editHeader for a syntax-highlighted code fragment.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | 1 | Title (name) of this code sample. Often a filename
| String | required |
Example
editThis wikitext:
{{Codesample-header|[https://gerrit.wikimedia.org/g/mediawiki/core/+/REL1_43/includes/specials/SpecialBlankpage.php includes/specials/SpecialBlankpage.php]}}
<syntaxhighlight lang="php">
public function execute( $par ) {
$this->setHeaders();
$this->getOutput()->addWikiMsg( 'intentionallyblankpage' );
}
</syntaxhighlight>
Displays as:
public function execute( $par ) {
$this->setHeaders();
$this->getOutput()->addWikiMsg( 'intentionallyblankpage' );
}
See also
edit- {{Codesample }}