Template:VerseRow: Difference between revisions

No edit summary
Tag: Manual revert
No edit summary
Line 1: Line 1:
<!--
  Template:VerseRow  (refactored — shared Verses table)
  ══════════════════════════════════════════════════════
  Stores verse data into a single shared `Verses` Cargo table
  usable across ALL documents on grantha.io.
  The `commentaries` field uses Cargo's  List (,) of String  type,
  so you can query:
    WHERE commentaries HOLDS "balabodhini"
    WHERE commentaries HOLDS "shankarabhashya"
  Called automatically by Template:VerseBlock — do not call directly.
  Cargo table declaration (add inside <noinclude> on this template):
    {{#cargo_declare: _table=Verses
    | document_id  = String
    | chapter_id  = String
    | verse_id    = String
    | verse_type  = String
    | verse_text  = Text
    | commentaries = List (,) of String
    }}
-->
{{#cargo_store: _table=Verses
{{#cargo_store: _table=Verses
| document_id  = {{{document_id|}}}
| document_id  = {{{document_id|}}}
Line 39: Line 16:
| commentaries = List (,) of String
| commentaries = List (,) of String
}}
}}
== Usage ==
Called by {{tl|VerseBlock}} automatically. Do not invoke directly.
=== Cargo table: Verses ===
One shared table for all documents. Query examples:


'''All verses in a chapter:'''
'''All verses in a chapter:'''