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-<!--{$id|default:'default'|escape:'html'}-->"> | <div class="bookshop-widget-container" id="bookshop-widget-<!--{$id|default:'default'|escape:'html'}-->"> | ||
<script async src="https://bookshop.org/widgets.js" | <script async src="https://bookshop.org/widgets.js" | ||
data-type="<!--{$ | data-type="<!--{$style|default:'book'|escape:'html'}-->" | ||
<!--{if $style == 'featured'}-->data-full-info="true"<!--{/if}--> | |||
data-affiliate-id="<!--{$affiliate|default:'111716'|escape:'html'}-->" | data-affiliate-id="<!--{$affiliate|default:'111716'|escape:'html'}-->" | ||
data-sku="<!--{$sku|escape:'html'}-->"> | data-sku="<!--{$sku|escape:'html'}-->"> | ||
Line 17: | Line 17: | ||
<noinclude> | <noinclude> | ||
== Bookshop.org Widget == | == Bookshop.org Widget == | ||
This widget embeds a Bookshop.org book widget on a wiki page. | This widget embeds a Bookshop.org book widget on a wiki page with different style options. | ||
=== Usage === | === Usage === | ||
<pre> | <pre> | ||
{{#widget:Bookshop | {{#widget:Bookshop | ||
| | |style=featured | ||
| | |sku=9780062316110 | ||
|affiliate=111716 | |affiliate=111716 | ||
| | |id=my-book-1 | ||
}} | }} | ||
</pre> | </pre> | ||
=== Parameters === | === Parameters === | ||
* style (optional): Display style - one of: "book" (default), "featured", "buy", or "list" | |||
* sku (required): The book's ISBN/SKU number (example: 9780062316110) | |||
* affiliate (optional): Your Bookshop.org affiliate ID (default: 111716) | |||
* id (optional): A unique identifier for this widget instance (default: "default") | * id (optional): A unique identifier for this widget instance (default: "default") | ||
* | |||
=== Troubleshooting === | |||
* | * If the widget shows "Not Found", verify that the ISBN/SKU is correct and available on Bookshop.org | ||
* Some ad blockers may interfere with the widget's functionality | |||
</noinclude> | </noinclude> |
Revision as of 17:05, 10 March 2025
Bookshop.org Widget
This widget embeds a Bookshop.org book widget on a wiki page with different style options.
Usage
{{#widget:Bookshop |style=featured |sku=9780062316110 |affiliate=111716 |id=my-book-1 }}
Parameters
- style (optional): Display style - one of: "book" (default), "featured", "buy", or "list"
- sku (required): The book's ISBN/SKU number (example: 9780062316110)
- affiliate (optional): Your Bookshop.org affiliate ID (default: 111716)
- id (optional): A unique identifier for this widget instance (default: "default")
Troubleshooting
- If the widget shows "Not Found", verify that the ISBN/SKU is correct and available on Bookshop.org
- Some ad blockers may interfere with the widget's functionality