Template:Codesample-header/doc: Difference between revisions
Appearance
No edit summary |
m 1 revision imported: Initial Setup |
||
(No difference)
| |||
Latest revision as of 08:16, 12 April 2026
| 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
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
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
- {{Codesample}}