Template:BookCard: Difference between revisions

From WikiProducers
No edit summary
No edit summary
 
Line 4: Line 4:
</noinclude><includeonly>{{#cargo_store:_table=BookCard}}
</noinclude><includeonly>{{#cargo_store:_table=BookCard}}
{{#template_display:_format=infobox}}</includeonly>
{{#template_display:_format=infobox}}</includeonly>
{
  "description": "Reusable book card with Amazon affiliate link",
  "params": {
    "title": {
      "label": "Book Title",
      "type": "string",
      "required": true
    },
    "author": {
      "label": "Author",
      "type": "string"
    },
    "pages": {
      "label": "Pages",
      "type": "number"
    },
    "year": {
      "label": "Year",
      "type": "number"
    },
    "description": {
      "label": "Description",
      "type": "string",
      "multiline": true
    },
    "cover": {
      "label": "Cover Image URL",
      "type": "string"
    },
    "link": {
      "label": "Amazon Link",
      "type": "string"
    },
    "cta": {
      "label": "Button Text",
      "type": "string"
    },
    "tag": {
      "label": "Category Tag",
      "type": "string"
    },
    "stars": {
      "label": "Rating",
      "type": "string"
    }
  }
}

Latest revision as of 10:00, 16 August 2025

This is the "BookCard" template.

It should be called in the following format:

{{BookCard
|title=
|author=
|pages=
|year=
|description=
|cover=
|link=
|cta=
|tag=
|stars=
}}

Edit the page to see the template text.

{{#cargo_declare:_table=BookCard|title=String|author=String|pages=Page|year=Page|description=String (allowed values=cover)|cover=String|link=String|cta=String|tag=String|stars=String}}


{

 "description": "Reusable book card with Amazon affiliate link",
 "params": {
   "title": {
     "label": "Book Title",
     "type": "string",
     "required": true
   },
   "author": {
     "label": "Author",
     "type": "string"
   },
   "pages": {
     "label": "Pages",
     "type": "number"
   },
   "year": {
     "label": "Year",
     "type": "number"
   },
   "description": {
     "label": "Description",
     "type": "string",
     "multiline": true
   },
   "cover": {
     "label": "Cover Image URL",
     "type": "string"
   },
   "link": {
     "label": "Amazon Link",
     "type": "string"
   },
   "cta": {
     "label": "Button Text",
     "type": "string"
   },
   "tag": {
     "label": "Category Tag",
     "type": "string"
   },
   "stars": {
     "label": "Rating",
     "type": "string"
   }
 }

}