Jump to content
Toggle menu
  • 47 articles
  • 2 files
  • 2 users
  • 195 edits
Virginia.wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Book destination: Difference between revisions

Template page
No edit summary
Install Virginia.wiki destination-commerce fallback architecture
 
Line 1: Line 1:
<includeonly>
<includeonly>{{#ifexist:Template:Destination affiliate/{{{destination|}}}
{{#ifexist:Template:Destination affiliate/{{{destination|}}}
|{{Book destination record
 
  |record={{{destination}}}
|<!-- DESTINATION RECORD EXISTS -->
  |name={{{name|}}}
 
  }}
{{#if:
|{{#ifexist:Template:Destination affiliate/default
{{Destination affiliate/{{{destination}}}|hotel1}}
  |{{Book destination record
{{Destination affiliate/{{{destination}}}|hotel2}}
    |record=default
{{Destination affiliate/{{{destination}}}|cars}}
    |name={{{name|}}}
 
    }}
|
  }}
<div class="vw-book-destination vw-book-destination-compact">
}}</includeonly>
 
<div class="vw-book-kicker">PLAN YOUR VISIT</div>
 
<div class="vw-book-title">
Plan a trip to {{{name|{{Destination affiliate/{{{destination}}}|name}}}}}
</div>
 
{{#if:
{{Destination affiliate/{{{destination}}}|hotel1}}
{{Destination affiliate/{{{destination}}}|hotel2}}
|
<div class="vw-book-row">
 
<div class="vw-book-row-copy">
<div class="vw-book-item-title">Places to stay</div>
<div class="vw-book-item-text">Compare hotels and accommodations for your trip.</div>
</div>
 
<div class="vw-book-row-actions">
 
{{#if:{{Destination affiliate/{{{destination}}}|hotel1}}|
{{Commerce button
|url={{Destination affiliate/{{{destination}}}|hotel1}}
|label={{Destination affiliate/{{{destination}}}|hotel1_label}}
}}
}}
 
{{#if:{{Destination affiliate/{{{destination}}}|hotel2}}|
{{Commerce button
|url={{Destination affiliate/{{{destination}}}|hotel2}}
|label={{Destination affiliate/{{{destination}}}|hotel2_label}}
}}
}}
 
</div>
 
</div>
}}
 
{{#if:{{Destination affiliate/{{{destination}}}|cars}}|
<div class="vw-book-row">
 
<div class="vw-book-row-copy">
<div class="vw-book-item-title">Getting around</div>
<div class="vw-book-item-text">Compare transportation options for your trip.</div>
</div>
 
<div class="vw-book-row-actions">
{{Commerce button
|url={{Destination affiliate/{{{destination}}}|cars}}
|label={{Destination affiliate/{{{destination}}}|cars_label}}
}}
</div>
 
</div>
}}
 
</div>
 
|<!-- DESTINATION RECORD EXISTS BUT HAS NO ACTIVE LINKS -->
}}
 
|<!-- NO DESTINATION RECORD -->
}}
</includeonly>


<noinclude>
<noinclude>
== Usage ==
== Usage ==
<pre>
<pre>
{{Book destination
{{Book destination
Line 86: Line 20:
}}
}}
</pre>
</pre>
 
A destination-specific record is preferred. If it does not exist, the sitewide default affiliate record is used.
Affiliate URLs are stored in destination records such as:
 
<pre>
Template:Destination affiliate/VA-WILLIAMSBURG
</pre>
 
The article itself should not contain affiliate URLs.
</noinclude>
</noinclude>

Latest revision as of 06:35, 17 October 2026


Usage

{{Book destination
 |destination=VA-WILLIAMSBURG
 |name=Williamsburg
}}

A destination-specific record is preferred. If it does not exist, the sitewide default affiliate record is used.