Jump to content

Template:Adhyaya: Difference between revisions

From Grantha
No edit summary
No edit summary
Line 6: Line 6:
| title_trans  = String
| title_trans  = String
| has_intro    = Boolean
| has_intro    = Boolean
}}</noinclude><div class="adhyaya-block" id="{{{document_id}}}_C{{{chapter_num}}}"><h2>{{{title}}}</h2>{{#if:{{{title_trans|}}}|<p>{{{title_trans}}}</p>}}{{#if:{{{intro|}}}|<div class="adhyaya-block-intro">{{{intro}}}</div>}}</div><noinclude>
}}</noinclude>{{#cargo_store: _table=Adhyaya
 
</noinclude>{{#cargo_store: _table=Adhyaya
| document_id  = {{{document_id|}}}
| document_id  = {{{document_id|}}}
| chapter_id  = {{{document_id}}}_C{{{chapter_num}}}
| chapter_id  = {{{document_id}}}_C{{{chapter_num|}}}
| chapter_num  = {{{chapter_num|}}}
| chapter_num  = {{{chapter_num|}}}
| title        = {{{title|}}}
| title        = {{{title|}}}
| title_trans  = {{{title_trans|}}}
| title_trans  = {{{title_trans|}}}
| has_intro    = {{#if:{{{intro|}}}|yes|no}}
| has_intro    = {{#if:{{{intro|}}}|yes|no}}
}}
}}<includeonly>{{#if:{{{title_trans|}}}|<p class="adhyaya-trans">{{{title_trans}}}</p>}}{{#if:{{{intro|}}}|<div class="adhyaya-intro">{{{intro}}}</div>}}</includeonly><noinclude>
== Template:Adhyaya ==
Stores chapter/section metadata in Cargo. The heading itself is rendered
by the <code>== heading ==</code> wiki markup before this template call,
so MediaWiki's built-in TOC picks it up automatically.
 
=== Parameters ===
{| class="wikitable"
|-
! Parameter !! Description
|-
| <code>document_id</code> || Document ID (e.g. IS, AIT)
|-
| <code>chapter_num</code> || Chapter number (1, 2, 3…)
|-
| <code>title</code> || Section/chapter title in Sanskrit
|-
| <code>title_trans</code> || Optional transliteration
|-
| <code>intro</code> || Optional introductory text
|}
[[Category:Templates]]
[[Category:Cargo store templates]]
</noinclude>

Revision as of 17:58, 10 April 2026

This template defines the table "Adhyaya". View table. A replacement table has been generated for this table; View replacement table.

Template:Adhyaya

Stores chapter/section metadata in Cargo. The heading itself is rendered by the == heading == wiki markup before this template call, so MediaWiki's built-in TOC picks it up automatically.

Parameters

Parameter Description
document_id Document ID (e.g. IS, AIT)
chapter_num Chapter number (1, 2, 3…)
title Section/chapter title in Sanskrit
title_trans Optional transliteration
intro Optional introductory text