模板:ArticleBasedOnModel

来自百问网嵌入式Linux wiki

Usage

The ArticleBasedOnModel template is used to store, in a page, the name of the model on which the page is based. It should be added at the bottom of the page that is based on a model. The models are available in the Using models category.

It puts a message box with a "light blue documents" icon in the page.

Only logged-in users who have writing permissions, can see this box. However, do not put any confidential information in the parameters of this template.

Usage: {{ArticleBasedOnModel | <model page>}}

Where:

  • <model page> is the mandatory name of the model page without its namespace (e.g. if the model page is "Contributors:How to article model", then <model page> is "How to article model")

Basic examples

You type You get
Article based on "Contributors:How to article model" model
{{ArticleBasedOnModel | How to article model}}

<securetransclude src="ProtectedTemplate:ArticleBasedOnModel" params="How to article model"></securetransclude>

More examples

You type You get
No model supplied
{{ArticleBasedOnModel}}

<securetransclude src="ProtectedTemplate:ArticleBasedOnModel" params=""></securetransclude>

Article based on an unknown model: bad link
{{ArticleBasedOnModel | Unknown model}}

<securetransclude src="ProtectedTemplate:ArticleBasedOnModel" params="Unknown model"></securetransclude>

Check that the spaces before and after the message
BEFORE{{ArticleBasedOnModel}}AFTER<br>
BEFORE
{{ArticleBasedOnModel}}
AFTER

BEFORE<securetransclude src="ProtectedTemplate:ArticleBasedOnModel" params=""></securetransclude>AFTER
BEFORE <securetransclude src="ProtectedTemplate:ArticleBasedOnModel" params=""></securetransclude> AFTER

Code

<securetransclude src="ProtectedTemplate:ArticleBasedOnModel" params=""></securetransclude>