Template:Codesample-header/doc
Appearance
This is a documentation subpage for Template:Codesample-header. It contains usage information, categories and other content that is not part of the original Template page. |
This template uses TemplateStyles: |
Usage
[edit]Header for a syntax-highlighted code fragment.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | 1 | Title (name) of this code sample. Often a filename
| String | required |
Example
[edit]This 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 }}