Jump to content

Widget:Bookshop: Difference between revisions

From 313FILES
Created page with "<div class="bookshop-widget"> <script src="https://bookshop.org/widgets.js" data-type="book" data-affiliate-id="111716" data-sku="9780691162553"></script> </div> <includeonly> <div class="bookshop-widget-container" id="bookshop-widget-{{{id|default}}}"> <script src="https://bookshop.org/widgets.js" data-type="{{{type|book}}}" data-affiliate-id="{{{affiliate|111716}}}" data-sku="{{{sku|9780691162553}}}"> </script> </div> </includeonly> <noinclude> ==..."
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="bookshop-widget">
<script src="https://bookshop.org/widgets.js" data-type="book" data-affiliate-id="111716" data-sku="9780691162553"></script>
</div>
<includeonly>
<includeonly>
<div class="bookshop-widget-container" id="bookshop-widget-{{{id|default}}}">
<div class="bookshop-widget-container" id="bookshop-widget-<!--{$id|default:'default'|escape:'html'}-->">
   <script src="https://bookshop.org/widgets.js"  
   <script async src="https://bookshop.org/widgets.js"  
     data-type="{{{type|book}}}"
     data-type="<!--{$style|default:'book'|escape:'html'}-->"
     data-affiliate-id="{{{affiliate|111716}}}"  
    <!--{if $style == 'featured'}-->data-full-info="true"<!--{/if}-->
     data-sku="{{{sku|9780691162553}}}">
     data-affiliate-id="<!--{$affiliate|default:'111716'|escape:'html'}-->"  
     data-sku="<!--{$sku|escape:'html'}-->">
   </script>
   </script>
  <noscript>
    <a href="https://bookshop.org/books/isbn/<!--{$sku|escape:'url'}-->" target="_blank">
      View book on Bookshop.org
    </a>
  </noscript>
</div>
</div>
</includeonly>
</includeonly>
<noinclude>
<noinclude>
== Bookshop.org Widget ==
This widget embeds a Bookshop.org book widget on a wiki page with different style options.
This widget embeds a Bookshop.org book widget on a wiki page.


=== Usage ===
=== Usage ===
<pre>
<pre>
{{widget:bookshop
{{#widget:Bookshop
   |id=unique-id
   |style=featured
   |type=book
   |sku=9780062316110
   |affiliate=111716
   |affiliate=111716
   |sku=9780691162553
   |id=my-book-1
}}
}}
</pre>
</pre>


=== Parameters ===
=== Parameters ===
* id (optional): A unique identifier for this widget instance
* style (optional): Display style - one of: "book" (default), "featured", "buy", or "list"
* type (optional): The widget type (default: "book")
* sku (required): The book's ISBN/SKU number (example: 9780062316110)
* 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)
* 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>

Latest revision as of 17:06, 10 March 2025


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