{exp:speedy:fragment key="quiz-results-v6-{stash:island_id}-{stash:parent_id}" global="yes" tags="quiz_automation|quizzes"}
{exp:playa:children entry_id="{stash:parent_id}" status="not Closed|draft" dynamic="no" col="{stash:island_id}" limit="6"}
{if '{channel_short_name}'=='pages' || '{channel_short_name}'=='pages_no_search' || '{channel_short_name}'=='sections' || '{channel_short_name}'=='authority_pages'}
{stash:cat_name}{stash:category}{/stash:cat_name}
{stash:theid}{entry_id}{/stash:theid}
{stash:thechannel}{channel_short_name}{/stash:thechannel}
{stash:date}{edit_date format="%Y-%m-%dT%H:%i:%s%Q"}{/stash:date}
{stash:heading}{if page_heading}{exp:ce_str:ing truncate="80"}{page_heading}{/exp:ce_str:ing}{if:else}{exp:ce_str:ing truncate="80"}{title}{/exp:ce_str:ing}{/if}{/stash:heading}
{stash:heading_url}{page_url_segment}{/stash:heading_url}
{stash:singular}{page_short_heading}{/stash:singular}
{stash:icon}
{if page_icon_block}{page_icon_block}{if:else}{page_icon}{/if}
{/stash:icon}
{stash:icon_focus}{if '{page_icon_focus}'=='right center'}right,center{if:elseif '{page_icon_focus}'=='left center'}left,center{if:else}center,center{/if}{/stash:icon_focus}
{stash:icon_text}
{/stash:icon_text}
{stash:icon-affiliate}
{/stash:icon-affiliate}
{stash:nofollow}{/stash:nofollow}
{stash:newwindow}{/stash:newwindow}
{stash:author_name}{exp:member:custom_profile_data member_id='{author_id}'}{author_name}{/exp:member:custom_profile_data}{/stash:author_name}
{stash:emblem_icon}{/stash:emblem_icon}
{stash:emblem_title}{page_emblem limit="1"}{emblem_heading}{/page_emblem}{/stash:emblem_title}
{stash:emblem_code}{page_emblem limit="1"}{emblem_code}{/page_emblem}{/stash:emblem_code}
{stash:emblem_code2}{page_emblem limit="1" offset="1"}{emblem_code}{/page_emblem}{/stash:emblem_code2}
{stash:affiliate-count}{/stash:affiliate-count}
{stash:watermark_button}
{if '{page_button_watermark}'!=''}{page_button_watermark}{if:else}learn-more-v8.png{/if}
{/stash:watermark_button}
{stash:call_to_action_button}
{if '{entry_button_watermark}'=='explore-now-v8.png'} explore now
{if:elseif '{entry_button_watermark}'=='learn-more-v8-ext.png'} learn more
{if:elseif '{entry_button_watermark}'=='book-online-v8.png'} book online
{if:elseif '{entry_button_watermark}'=='learn-more-ta-v8.png'} learn more
{if:elseif '{entry_button_watermark}'=='book-now-ta-v8.png'} book now
{if:elseif '{entry_button_watermark}'=='book-now-v8.png'} book now
{if:elseif '{entry_button_watermark}'=='buy-online-amz-v8.png'} buy online
{if:elseif '{entry_button_watermark}'=='buy-now-v8.png'} buy online
{if:elseif '{entry_button_watermark}'=='shop-now-v8.png'} shop now
{if:else} learn more
{/if}
{/stash:call_to_action_button}
{stash:guidereview-letter}
{/stash:guidereview-letter}
{stash:tile-ribbon}{/stash:tile-ribbon}
{stash:canon_url}
{if page_canonical}
{page_canonical}
{if:else}
{exp:query sql="SELECT field_id_587 as section_url FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=580 ORDER BY pr.rel_id ASC LIMIT 1 "}/{section_url}{/exp:query}{exp:query sql="SELECT field_id_544 as type_url FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=784 ORDER BY pr.rel_id ASC LIMIT 1 "}/{type_url}{/exp:query}/{url_title}
{/if}
{/stash:canon_url}
{stash:region_name}
{/stash:region_name}
{!-- Section Data --}
{exp:query sql="SELECT field_id_585 as section_name, field_id_613 as section_short_name, field_id_587 as section_url, entry_id as section_id, count(*) as the_count FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id='{entry_id}' AND (pr.parent_field_id='569' OR pr.parent_field_id='541' OR pr.parent_field_id='580') ORDER BY pr.rel_id ASC LIMIT 1"}
{stash:section}{section_name}{/stash:section}
{stash:section_short_name}{if section_short_name}{section_short_name}{if:else}Hawaii Travel Guide{/if}{/stash:section_short_name}
{stash:section_url}{if section_url}/{section_url}{/if}{/stash:section_url}
{stash:section_id}{section_id}{/stash:section_id}
{/exp:query}
{if:elseif '{channel_short_name}'=='workflow_ads_blocks' || '{channel_short_name}'=='affiliate_blocks' || '{channel_short_name}'=='affiliate_hotels' || '{channel_short_name}'=='store_blocks'}
{stash:cat_name}{stash:category}{/stash:cat_name}
{stash:theid}{entry_id}{/stash:theid}
{stash:thechannel}{channel_short_name}{/stash:thechannel}
{stash:date}{edit_date format="%Y-%m-%dT%H:%i:%s%Q"}{/stash:date}
{stash:heading}{if ad_cta_long}{ad_cta_long}{if:else}{ad_cta}{/if}{/stash:heading}
{stash:heading_url}{ad_url}{/stash:heading_url}
{stash:icon}{ad_graphic}{/stash:icon}
{stash:icon_text}{/stash:icon_text}
{stash:icon-affiliate}
{if ('{channel_short_name}'=='affiliate_blocks' || '{channel_short_name}'=='affiliate_hotels') && '{ad_image_override}'!='' && '{ad_image_directory}'!=''}
//cdn.hawaii-guide.com/ta/{ad_image_directory}/{ad_image_override}
{/if}
{if '{channel_short_name}'=='store_blocks' && '{ad_image_override}'!=''}
//cdn.hawaii-guide.com/store/{ad_image_override}
{/if}
{/stash:icon-affiliate}
{stash:icon_focus}center,center{/stash:icon_focus}
{stash:nofollow}{ad_nofollow}{/stash:nofollow}
{stash:newwindow}{ad_new_window}{/stash:newwindow}
{stash:author_name}{exp:member:custom_profile_data member_id='{author_id}'}{author_name}{/exp:member:custom_profile_data}{/stash:author_name}
{stash:emblem_icon}
{exp:jcogs_img:pair src="{ad_emblem_icon}" width="90" height="74"}{made}{/exp:jcogs_img:pair}
{/stash:emblem_icon}
{stash:emblem_title}{ad_emblem limit="1"}{emblem_heading}{/ad_emblem}{/stash:emblem_title}
{stash:emblem_code}{ad_emblem limit="1"}{emblem_code}{/ad_emblem}{/stash:emblem_code}
{stash:emblem_code2}{ad_emblem limit="1" offset="1"}{emblem_code}{/ad_emblem}{/stash:emblem_code2}
{stash:emblem_heading}{ad_cta}{/stash:emblem_heading}
{stash:website}{/stash:website}
{stash:direct-link}{/stash:direct-link}
{stash:tile-ribbon}{ad_ribbon}{/stash:tile-ribbon}
{stash:ad-link}
{if '{ad_url_hc}'!=''}
{ad_url_hc}
{if:elseif '{ad_url}'!=''}
{ad_url}
{/if}
{/stash:ad-link}
{stash:cj-ta}
{if '{ad_url_hc}'!='' && '{ad_url}'!=''}
{ad_url}
{/if}
{/stash:cj-ta}
{stash:cj-hc}{/stash:cj-hc}
{stash:hc}{/stash:hc}
{stash:commission-links}
{/stash:commission-links}
{stash:wl-pl}
{exp:query sql="SELECT priceline_id FROM aff_booking_bridge WHERE ee_entry_id={entry_id} AND status='open' LIMIT 1 "}
http://book.guideofus.com/hotels/hotel/?refid=8187&hotel_id={priceline_id}
{/exp:query}
{/stash:wl-pl}
{stash:wl-pl_city}
{exp:query sql="SELECT bb.priceline_id as pl_id, pl.city as pl_city FROM aff_booking_bridge bb JOIN aff_pl_hotels pl on pl.hotelid_ppn = bb.priceline_id WHERE bb.ee_entry_id={entry_id} AND bb.status='open' LIMIT 1 "}
{pl_city}
{/exp:query}
{/stash:wl-pl_city}
{stash:wl-pl_star_rating}
{exp:query sql="SELECT bb.priceline_id as pl_id, pl.star_rating as pl_star_rating FROM aff_booking_bridge bb JOIN aff_pl_hotels pl on pl.hotelid_ppn = bb.priceline_id WHERE bb.ee_entry_id={entry_id} AND bb.status='open' LIMIT 1 "}
{pl_star_rating}
{/exp:query}
{/stash:wl-pl_star_rating}
{stash:watermark_button}
{if '{ad_button_watermark}'!=''}{ad_button_watermark}{if:else}learn-more-v8.png{/if}
{/stash:watermark_button}
{stash:call_to_action_button}
{if '{entry_button_watermark}'=='explore-now-v8.png'} explore now
{if:elseif '{entry_button_watermark}'=='learn-more-v8-ext.png'} learn more
{if:elseif '{entry_button_watermark}'=='book-online-v8.png'} book online
{if:elseif '{entry_button_watermark}'=='learn-more-ta-v8.png'} learn more
{if:elseif '{entry_button_watermark}'=='book-now-ta-v8.png'} book now
{if:elseif '{entry_button_watermark}'=='book-now-v8.png'} book now
{if:elseif '{entry_button_watermark}'=='buy-online-amz-v8.png'} buy online
{if:elseif '{entry_button_watermark}'=='buy-now-v8.png'} buy online
{if:elseif '{entry_button_watermark}'=='shop-now-v8.png'} shop now
{if:else} learn more
{/if}
{/stash:call_to_action_button}
{stash:guidereview-letter}
{/stash:guidereview-letter}
{stash:affiliate-count}{ad_affiliate_links:total_rows}{/stash:affiliate-count}
{stash:canon_url}{/stash:canon_url}
{stash:region_name}
{/stash:region_name}
{stash:section}Hawaii Travel Guide{/stash:section}
{stash:section_short_name}Hawaii Travel Guide{/stash:section_short_name}
{stash:section_url}/{/stash:section_url}
{stash:section_id}{/stash:section_id}
{if:elseif '{channel_short_name}'=='hub' || '{channel_short_name}'=='classification' || '{channel_short_name}'=='subclassification' || '{channel_short_name}'=='type' || '{channel_short_name}'=='regions' || '{channel_short_name}'=='hybrid' || '{channel_short_name}'=='store_classification' || '{channel_short_name}'=='store_subclassification'}
{stash:cat_name}{stash:category}{/stash:cat_name}
{stash:theid}{entry_id}{/stash:theid}
{stash:thechannel}{channel_short_name}{/stash:thechannel}
{stash:date}{edit_date format="%Y-%m-%dT%H:%i:%s%Q"}{/stash:date}
{stash:heading}{if custom_heading}{exp:ce_str:ing truncate="80"}{custom_heading}{/exp:ce_str:ing}{if:else}{exp:ce_str:ing truncate="80"}{title}{/exp:ce_str:ing}{/if}{/stash:heading}
{stash:heading_url}{custom_url_segment}{/stash:heading_url}
{stash:singular}{custom_name_singular}{/stash:singular}
{stash:icon}
{if custom_icon_block}{custom_icon_block}{if:else}{custom_icon}{/if}
{/stash:icon}
{stash:icon_focus}{if '{custom_icon_focus}'=='right center'}right,center{if:elseif '{custom_icon_focus}'=='left center'}left,center{if:else}center,center{/if}{/stash:icon_focus}
{stash:icon_text}
{custom_icon_text}
{/stash:icon_text}
{stash:icon-affiliate}
{/stash:icon-affiliate}
{stash:nofollow}{/stash:nofollow}
{stash:newwindow}{/stash:newwindow}
{stash:author_name}{exp:member:custom_profile_data member_id='{author_id}'}{author_name}{/exp:member:custom_profile_data}{/stash:author_name}
{stash:website}{/stash:website}
{stash:direct-link}{/stash:direct-link}
{stash:tile-ribbon}{/stash:tile-ribbon}
{stash:ad-link}
{if custom_white_label}
{custom_white_label}
{/if}
{/stash:ad-link}
{stash:cj-ta}{/stash:cj-ta}
{stash:cj-hc}{/stash:cj-hc}
{stash:hc}{/stash:hc}
{stash:commission-links}
{/stash:commission-links}
{stash:emblem_icon}{/stash:emblem_icon}
{stash:emblem_title}{custom_emblem limit="1"}{emblem_heading}{/custom_emblem}{/stash:emblem_title}
{stash:emblem_code}{custom_emblem limit="1"}{emblem_code}{/custom_emblem}{/stash:emblem_code}
{stash:emblem_code2}{custom_emblem limit="1" offset="1"}{emblem_code}{/custom_emblem}{/stash:emblem_code2}
{stash:watermark_button}
{if '{custom_button_watermark}'!=''}{custom_button_watermark}{if:else}learn-more-v8.png{/if}
{/stash:watermark_button}
{stash:call_to_action_button}
{if '{entry_button_watermark}'=='explore-now-v8.png'} explore now
{if:elseif '{entry_button_watermark}'=='learn-more-v8-ext.png'} learn more
{if:elseif '{entry_button_watermark}'=='book-online-v8.png'} book online
{if:elseif '{entry_button_watermark}'=='learn-more-ta-v8.png'} learn more
{if:elseif '{entry_button_watermark}'=='book-now-ta-v8.png'} book now
{if:elseif '{entry_button_watermark}'=='book-now-v8.png'} book now
{if:elseif '{entry_button_watermark}'=='buy-online-amz-v8.png'} buy online
{if:elseif '{entry_button_watermark}'=='buy-now-v8.png'} buy online
{if:elseif '{entry_button_watermark}'=='shop-now-v8.png'} shop now
{if:else} learn more
{/if}
{/stash:call_to_action_button}
{stash:guidereview-letter}
{/stash:guidereview-letter}
{stash:affiliate-count}{/stash:affiliate-count}
{stash:canon_url}
{if custom_canonical}
{custom_canonical}
{if:else}
{exp:query sql="SELECT field_id_587 as section_url FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=541 ORDER BY pr.rel_id ASC LIMIT 1 "}/{section_url}{/exp:query}{exp:query sql="SELECT field_id_544 as type_url FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=595 ORDER BY pr.rel_id ASC LIMIT 1 "}/{type_url}{/exp:query}{exp:query sql="SELECT field_id_544 as class_url FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=543 ORDER BY pr.rel_id ASC LIMIT 1 "}/{class_url}{/exp:query}/{url_title}
{/if}
{/stash:canon_url}
{stash:region_name}
{/stash:region_name}
{!-- Section Data --}
{exp:query sql="SELECT field_id_585 as section_name, field_id_613 as section_short_name, field_id_587 as section_url, entry_id as section_id, count(*) as the_count FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = (SELECT pr.child_entry_id as child_id FROM exp_playa_relationships pr WHERE pr.parent_entry_id={entry_id} AND (pr.parent_field_id='569' OR pr.parent_field_id='541' OR pr.parent_field_id='580') ORDER BY pr.rel_order ASC LIMIT 1) LIMIT 1"}
{stash:section}{section_name}{/stash:section}
{stash:section_short_name}{if section_short_name}{section_short_name}{if:else}Hawaii Travel Guide{/if}{/stash:section_short_name}
{stash:section_url}{if section_url}/{section_url}{/if}{/stash:section_url}
{stash:section_id}{section_id}{/stash:section_id}
{/exp:query}
{if:else}
{stash:cat_name}{stash:category}{/stash:cat_name}
{stash:theid}{entry_id}{/stash:theid}
{stash:thechannel}{channel_short_name}{/stash:thechannel}
{stash:date}{edit_date format="%Y-%m-%dT%H:%i:%s%Q"}{/stash:date}
{stash:heading}{if entry_heading}{exp:ce_str:ing truncate="80"}{entry_heading}{/exp:ce_str:ing}{if:else}{exp:ce_str:ing truncate="80"}{title}{/exp:ce_str:ing}{/if}{/stash:heading}
{stash:heading_url}{url_title}{/stash:heading_url}
{stash:icon}
{if '{entry_image_override}'!=''}//cdn.hawaii-guide.com/spots_icons/{entry_image_override}{if:elseif entry_icon_block}{entry_icon_block}{if:else}{entry_icon}{/if}
{/stash:icon}
{stash:icon_focus}{if '{entry_icon_focus}'=='right center'}right,center{if:elseif '{entry_icon_focus}'=='left center'}left,center{if:else}center,center{/if}{/stash:icon_focus}
{stash:icon_text}
{/stash:icon_text}
{stash:icon-affiliate}
{/stash:icon-affiliate}
{stash:website}{entry_website}{/stash:website}
{stash:direct-link}{entry_direct_link}{/stash:direct-link}
{stash:tile-ribbon}{/stash:tile-ribbon}
{stash:ad-link}
{if entry_white_label}
{entry_white_label}
{if:elseif entry_website && '{channel_short_name}'=='hawaiitours'}
{entry_website}
{/if}
{/stash:ad-link}
{stash:icon-cj}{cj_photo}{/stash:icon-cj}
{stash:cj-ta}{cj_ta_deep_link}{/stash:cj-ta}
{stash:cj-hc}{cj_ad_deep_link}{/stash:cj-hc}
{stash:cj-expedia}{cj_ad_deep_link}{/stash:cj-expedia}
{stash:hc}{entry_white_label_hc}{/stash:hc}
{stash:wl-pl}{if entry_white_label}{entry_white_label}{/if}{/stash:wl-pl}
{stash:wl-pl_star_rating}{if '{entry_star_rating}'!='---'}{entry_star_rating}{/if}{/stash:wl-pl_star_rating}
{stash:nofollow}{/stash:nofollow}
{stash:newwindow}{/stash:newwindow}
{stash:author_name}{exp:member:custom_profile_data member_id='{author_id}'}{author_name}{/exp:member:custom_profile_data}{/stash:author_name}
{stash:watermark_button}
{if '{entry_button_watermark}'!=''}{entry_button_watermark}{if:else}learn-more-v8.png{/if}
{/stash:watermark_button}
{stash:call_to_action_button}
{if '{entry_button_watermark}'=='explore-now-v8.png'} explore now
{if:elseif '{entry_button_watermark}'=='learn-more-v8-ext.png'} learn more
{if:elseif '{entry_button_watermark}'=='book-online-v8.png'} book online
{if:elseif '{entry_button_watermark}'=='learn-more-ta-v8.png'} learn more
{if:elseif '{entry_button_watermark}'=='book-now-ta-v8.png'} book now
{if:elseif '{entry_button_watermark}'=='book-now-v8.png'} book now
{if:elseif '{entry_button_watermark}'=='buy-online-amz-v8.png'} buy online
{if:elseif '{entry_button_watermark}'=='buy-now-v8.png'} buy online
{if:elseif '{entry_button_watermark}'=='shop-now-v8.png'} shop now
{if:else} learn more
{/if}
{/stash:call_to_action_button}
{stash:guidereview-letter}{entry_guidereview_grade}{/stash:guidereview-letter}
{stash:emblem_title}{entry_emblem limit="1"}{emblem_heading}{/entry_emblem}{/stash:emblem_title}
{stash:emblem_code}{entry_emblem limit="1"}{emblem_code}{/entry_emblem}{/stash:emblem_code}
{stash:emblem_code2}{entry_emblem limit="1" offset="1"}{emblem_code}{/entry_emblem}{/stash:emblem_code2}
{stash:emblem_icon}{entry_emblem limit="1"}{emblem_icon}{/entry_emblem}{/stash:emblem_icon}
{stash:commission-links}{entry_disable_commission_links}{/stash:commission-links}
{stash:affiliate-count}{/stash:affiliate-count}
{stash:canon_url}
{if entry_canonical_url}
{entry_canonical_url}
{if:else}
{exp:query sql="SELECT field_id_587 as section_url FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=569 ORDER BY pr.rel_id ASC LIMIT 1 "}/{section_url}{/exp:query}{exp:query sql="SELECT field_id_544 as type_url FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=591 ORDER BY pr.rel_id ASC LIMIT 1 "}/{type_url}{/exp:query}{exp:query sql="SELECT field_id_544 as class_url FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=535 ORDER BY pr.rel_id ASC LIMIT 1 "}/{class_url}{/exp:query}/{url_title}
{/if}
{/stash:canon_url}
{stash:region_name}
{exp:query sql="SELECT field_id_548 as region_name, field_id_593 as region_name_short, count(*) as the_count FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=536 ORDER BY pr.rel_id ASC LIMIT 3 "}{if '{the_count}'=='1'}{region_name}{/if}{/exp:query}
{/stash:region_name}
{stash:region_canon_url}
{exp:query sql="SELECT field_id_548 as region_name, field_id_955 as region_canon_url, count(*) as the_count FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = pr.child_entry_id AND pr.parent_entry_id={entry_id} AND pr.parent_field_id=536 ORDER BY pr.rel_id ASC LIMIT 3 "}{if '{the_count}'=='1'}{region_canon_url}{/if}{/exp:query}
{/stash:region_canon_url}
{stash:details-check}{if entry_details_matrix:total_rows > 0}Yes{/if}{/stash:details-check}
{exp:stash:set_list:nested name="{stash:list_entry_id}-details" parse_tags="yes" parse_conditionals="yes" trim="yes"}
{entry_details_matrix}
{stash:topic_name}{topic}{/stash:topic_name}
{stash:topic_short}{topic_answer_short}{/stash:topic_short}
{stash:topic_multi}{topic_answer_multi}{option}
{/topic_answer_multi}{/stash:topic_multi}
{/entry_details_matrix}
{/exp:stash:set_list:nested}
{!-- Section Data --}
{exp:query sql="SELECT field_id_585 as section_name, field_id_613 as section_short_name, field_id_587 as section_url, entry_id as section_id, count(*) as the_count FROM exp_channel_data cd JOIN exp_playa_relationships pr WHERE cd.entry_id = (SELECT pr.child_entry_id as child_id FROM exp_playa_relationships pr WHERE pr.parent_entry_id={entry_id} AND (pr.parent_field_id='569' OR pr.parent_field_id='541' OR pr.parent_field_id='580') ORDER BY pr.rel_order ASC LIMIT 1) LIMIT 1"}
{stash:section_short_name}{if section_short_name}{section_short_name}{if:else}Hawaii Travel Guide{/if}{/stash:section_short_name}
{stash:section_url}{if section_url}/{section_url}{/if}{/stash:section_url}
{stash:section_id}{section_id}{/stash:section_id}
{/exp:query}
{/if}
{/exp:playa:children}
{/exp:speedy:fragment}