Template:Codesample-header

{{{1}}}
Template documentation

Usage

edit

Header for a syntax-highlighted code fragment.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Title1

Title (name) of this code sample. Often a filename

Example
includes/specials/SpecialBlankpage.php
Stringrequired

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