Widget:Bookshop: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<div class="bookshop-widget-container" id="bookshop-widget-{ | <div class="bookshop-widget-container" id="bookshop-widget-<!--{$id|default:'default'|escape:'html'}-->"> | ||
<script src="https://bookshop.org/widgets.js" | <script src="https://bookshop.org/widgets.js" | ||
data-type="{ | data-type="<!--{$type|default:'book'|escape:'html'}-->" | ||
data-affiliate-id="{ | data-affiliate-id="<!--{$affiliate|default:'111716'|escape:'html'}-->" | ||
data-sku="{ | data-sku="<!--{$sku|default:'9780691162553'|escape:'html'}-->"> | ||
</script> | </script> | ||
</div> | </div> | ||
Line 15: | Line 15: | ||
=== Usage === | === Usage === | ||
<pre> | <pre> | ||
{{widget: | {{#widget:Bookshop | ||
|id=unique-id | |id=unique-id | ||
|type=book | |type=book | ||
Line 24: | Line 24: | ||
=== Parameters === | === Parameters === | ||
* id (optional): A unique identifier for this widget instance | * id (optional): A unique identifier for this widget instance (default: "default") | ||
* type (optional): The widget type (default: "book") | * type (optional): The widget type (default: "book") | ||
* affiliate (optional): Your Bookshop.org affiliate ID (default: 111716) | * affiliate (optional): Your Bookshop.org affiliate ID (default: 111716) | ||
* sku (optional): The book's SKU number (default: 9780691162553) | * sku (optional): The book's SKU number (default: 9780691162553) | ||
</noinclude> | </noinclude> |
Revision as of 16:18, 10 March 2025
Bookshop.org Widget
This widget embeds a Bookshop.org book widget on a wiki page.
Usage
{{#widget:Bookshop |id=unique-id |type=book |affiliate=111716 |sku=9780691162553 }}
Parameters
- id (optional): A unique identifier for this widget instance (default: "default")
- type (optional): The widget type (default: "book")
- affiliate (optional): Your Bookshop.org affiliate ID (default: 111716)
- sku (optional): The book's SKU number (default: 9780691162553)