साँचा:Random subpage/doc

मुक्त ज्ञानकोश विकिपीडिया से
नेविगेशन पर जाएँ खोज पर जाएँ

{{

 साँचा:namespace detect

| type = notice | image = | imageright = | class = | style = margin-bottom:1.0em; | textstyle = | text = साँचा:strong for साँचा:terminate sentence
It contains usage information, categories and other content that is not part of the original साँचा page. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }} साँचा:lua

साँचा लेआउट

{{Random subpage}}
अथवा
{{Random subpage|page=<page name>|start=<number>|end=<number>|same=<number>}}
अथवा
{{Random subpage|<page name>|<number>|<number>|<number>}}

प्रयोगविधि

This template transcludes a numbered sub-page that is randomly selected between the "start"-numbered sub-page and the "end"-numbered sub-page as follows:

{{<page name>/<randomly selected number between "start" and "end">}}

It may be used with or without parameters as follows:

  • 1|page: The name of the page to be displayed (without the subpage number). The default is empty.
  • 2|start: The starting sub-subpage number. Must be a positive integer. The default is 1.
  • 3|end: The ending sub-subpage number. Must be a positive integer. The default is 2.
  • 4|same: (optional) This parameter makes different template invocations link to the same subpage. It can be set with साँचा:para, साँचा:para, साँचा:para or साँचा:para. For it to work, the साँचा:para parameter must be set on all desired templates on a page, and those templates must also use the same start and end values. The subpage chosen will change randomly if the page is edited or purged.

Note: this template used to accept a साँचा:para parameter, but this has been deprecated after the template was switched to use Module:Random.

उदाहरण

This template can be used to display a list of randomly selected items from a group of numbered subpages. For example, portals that use "Did you know..." sections can randomly display four items from a page named "Portal:Foo/Did you know" that has sixteen numbered subpages as follows:

{{Random subpage|page=Portal:Foo/Did you know|start=1|end=4}}
{{Random subpage|page=Portal:Foo/Did you know|start=5|end=8}}
{{Random subpage|page=Portal:Foo/Did you know|start=9|end=12}}
{{Random subpage|page=Portal:Foo/Did you know|start=13|end=16}}