ETP Main Theme - Material - Custom Code Backup

Code Backup Last Updated: 30/12/2025
Code Backup Last Updated By: Alex Rayfield (Imagen)


Manage Styles:

 Primary: #FFFFFF
 Primary Dark: #070247
 Secondry: #000FE1
 Font: BrownLLWeb-Regular.woff2

Homepage - Intro Text:

 <!-- ========== EUROPEAN TOUR logo right ========== -->
 <div style="display: flex; justify-content: center; align-items: center;">
 <div style="display: flex; align-items: center; gap: 100px;">
 <h1 style="margin: 0; font-size: 30px; text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.55);">Welcome to the<br /></h1>
 <img src="https://media.mediahub.europeantour.com/storage/v1/file/0x060a2b340101010201010f12130fb1fba613370301090680ba789457A5538D8B" alt="" width="200" height="130" style="filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.45));" /></div>
 </div>


 <!-- ========== EUROPEAN TOUR logo left ========== -->
 <!--
 <div style="display: flex; justify-content: center; align-items: center;">
 <div style="display: flex; align-items: center; gap: 100px;"><img src="https://media.mediahub.europeantour.com/storage/v1/file/0x060a2b340101010201010f12130fb1fba613370301090680ba789457A5538D8B" alt="" style="object-fit: cover;" width="200" height="130" />
 <h1 style="margin: 0; font-size: 30px;">Welcome to the <br /></h1>
 </div> -->

Footer Left:

<div style="margin-top:0.5em;"><p class="copyright">Copyright &copy; 2026 .<br>
 <p style="margin-top:0.1em;">Powered by  <a class="u-link" target="_blank" rel="noopener" href="http://www.imagen.io">Imagen.</a> </p>
 </div>

Footer Right:

<!-- ========== RYDER CUP ========== -->
 <!--<p><img src="https://media.mediahub.europeantour.com/storage/v1/file/0x060a2b340101010201010f1213499f6960a0ec0237090680f9f09457A5538D8B" width="300" height="60" alt="" style="display: block; margin-left: auto; margin-right:;" /></p> -->


 <!-- ========== LINKED ETP TOUR LOGOS ========== -->
 <div style="display: flex; align-items: center; gap: 10px;">


 <!-- DP WORLD TOUR LOGO -->
 <a href="https://www.europeantour.com/dpworld-tour/" style="flex: 1.1; display: block;">
 <img src="https://media.mediahub.europeantour.com/storage/v1/file/0x060a2b340101010201010f121312805dbb23f502720906807dac9457A5538D8B" height="50" alt="" style="object-fit: contain; max-height: 50px; transition: transform 0.3s ease; width: 100%;" onmouseover="this.style.transform='scale(1.1)'" onmouseout="this.style.transform='scale(1)'" />
 </a>


 <!-- HOTEL PLANNER TOUR LOGO -->
 <a href="https://www.europeantour.com/hotelplanner-tour/" style="flex: 1; display: block;">
 <img src="https://media.mediahub.europeantour.com/storage/v1/file/0x060a2b340101010201010f1213ec1e9c0278f50272090680deee9457A5538D8B" height="50" alt="" style="object-fit: contain; max-height: 50px; transition: transform 0.3s ease; width: 100%;" onmouseover="this.style.transform='scale(1.1)'" onmouseout="this.style.transform='scale(1)'" />
 </a>


 <!-- LEGENDS TOUR LOGO -->
 <a href="https://www.legendstour.com/" style="flex: 1; display: block;">
 <img src="https://media.mediahub.europeantour.com/storage/v1/file/0x060a2b340101010201010f1213539488b89ff50272090680795b9457A5538D8B" height="50" alt="" style="object-fit: contain; max-height: 50px; transition: transform 0.3s ease; width: 100%;" onmouseover="this.style.transform='scale(1.1)'" onmouseout="this.style.transform='scale(1)'" />
 </a>


 <!-- G4D TOUR LOGO -->
 <a href="https://www.europeantour.com/g4d-tour/" style="flex: 0.7; display: block;">
 <img src="https://media.mediahub.europeantour.com/storage/v1/file/0x060a2b340101010201010f1213c12c241552f502720906808bf79457A5538D8B" height="50" alt="" style="object-fit: contain; max-height: 50px; transition: transform 0.3s ease; width: 100%;" onmouseover="this.style.transform='scale(1.1)'" onmouseout="this.style.transform='scale(1)'" />
 </a>


 <!-- RYDER LOGO -->
 <a href="https://www.rydercup.com/" style="flex: 0.5; display: block;">
 <img src="https://media.mediahub.europeantour.com/storage/v1/file/0x060a2b340101010201010f1213dae98a357f180240090680ebd69457A5538D8B" height="50" alt="" style="object-fit: contain; max-height: 50px; transition: transform 0.3s ease; width: 100%;" onmouseover="this.style.transform='scale(1.1)'" onmouseout="this.style.transform='scale(1)'" />
 </a>
 </div>



===========================
HOMEPAGE CUSTOM STYLING

Last Updated: 13/01/2026
Last Updated By: Alex Rayfield
===========================

<style>/* Make Media View Widget Captions multi-line */ .caption { height: auto;font-size: clamp(1.25rem, 3.5vw, 3rem);line-height: 1.4;white-space: normal;overflow-wrap: anywhere;font-weight: 900;text-transform: uppercase;letter-spacing: 0.04em;/* Optional legibility if over imagery */text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

/* Images */
.frames-imageGridItemImg,
.relatedRecords-gridItemImg {
border-radius: 0.8rem 0.8rem 0 0;
border: 1px solid #e0e0e0;
transition: transform 200ms ease;
will-change: transform;
}

/* Text block below image (2-line clamp) */
.frames-imageGridItemTxt {
border-radius: 0 0 0.8rem 0.8rem;
background-color: var(--c-primary-accent-dark-color, #1976d2); /* keeps your theme var */
color: #fff;
font-size: 1rem;
line-height: 1.2;
padding: 0.5rem 0.75rem;

display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;

white-space: normal;
overflow-wrap: anywhere;

/* Fallback cap height if clamp unsupported */
max-height: calc(1.2em * 3);
min-height: calc(1.2em * 3);
}

.frames-imageGridItem:hover .frames-imageGridItemTxt {
background-color:var(--c-secondary-accent-color, #e91e63);
}


/* Grid item container */
.frames-imageGridItem {
border: none;
padding-inline: 3px;
padding-block: 0;
border-radius: 0.8rem;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
transition: border-radius 200ms ease, box-shadow 200ms ease;
}


/* Pagination */
.homepage-content .pagination--framesImageGrid {
border-top: 0;
}

/* Ryder Cup Grid Changes */
#dynamicWidgetZoneItem_459 .imageGridItem-image {
transform: scale(1);
}

/* Lower specificity using :where without changing selector chain */
:where(#dynamicWidgetZoneItem_459 .responsiveImageGrid.overlayCenter .caption) {
top: 75%;
}

#dynamicWidgetZoneItem_459 .caption {
font-size: 16px;
}

#dynamicWidgetZoneItem_459 .responsiveImageGrid.zoomIn .imageGridItem:hover .imageGridItem-image {
transform: scale(1.1);
}

/* DP W Ryder Logo grid changes */
#dynamicWidgetZoneItem_453 .imageGridItem-image {
transform: scale(0.7);
}

/* SWING Grid changes */
#dynamicWidgetZoneItem_456 .imageGridItem-image {
transform: scale(0.9);
}

#dynamicWidgetZoneItem_456 .responsiveImageGrid.zoomIn .imageGridItem:hover .imageGridItem-image {
transform: scale(1);
}

/* RESPONSIVE GRID - round edges - zoom in adjust etc */
.imageGridItem {
border-radius: 1rem;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
margin: 0;
transition: box-shadow 200ms ease, transform 200ms ease;
}

/* RESPONSIVE GRID - spacing */
.responsiveImageGrid {
gap: 10px;
}

/* SEARCH BAR - rounding corners */
.hero-section .u-inputTxt {
border-radius: 8px 0 0 8px;
}

/* SEARCH BUTTON - rounding corners */
.search-form .btn--main {
border-radius: 0 8px 8px 0;
}

/* Background Image Placeholder */
#bg-image-placeholder {
background-size: cover;
background-position: top;
position: relative;
z-index: 1;
overflow: hidden;
}

#bg-image-placeholder::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(to bottom, transparent 0%, transparent 80%, white 100%);
pointer-events: none;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
.imageGridItem,
.imageGridItem-image,
.frames-imageGridItem,
.frames-imageGridItemImg {
transition: none !important;
transform: none !important;
}
}
</style>



RECORD PAGE:

Code Backup Last Updated: 30/12/2025
Code Backup Last Updated By: Alex Rayfield (Imagen)


Download Button:

 
 <ul id="customButtonsWrap">    
   <li>  
     <a href="#" id="downloadButton" class="iocDocs downloadButton">  
       <div class="customButtonText">Download</div>  
       <i class="iw-icon-download"></i>  
     </a>  
   </li>  
 </ul>
   
 <style>  
   .iwMenu_recordPage.IWmenu_link {  
     bottom: calc(2rem + 8px);  
   }
   
   .record-header-section {  
     background: transparent;  
     margin-bottom: 0;  
   }
   
   #customButtonsWrap {  
     margin-left: auto;  
       
     width: auto;  
     float: right;  
     position: relative;  
     top: 6px;  
   }
   
   @media (min-width: 68em) {  
     #customButtonsWrap {  
       top: 10px;  
     }  
   }
   
   #customButtonsWrap li {  
     display: inline-block;  
     margin-bottom: 2rem;  
   }
   
   #customButtonsWrap a {  
     margin: 0 0.3rem;  
     padding: 0.75rem 1.5rem;  
     border: none;  
     border-radius: 4px;  
     font-weight: bold;  
     color: var(--c-secondary-accent-font-color, #fff);  
     background-color: var(--c-primary-accent-dark-color, #1976d2);  
     transition: box-shadow .2s ease-out;  
     box-shadow: 0 2px 10px 0 rgb(0 0 0 / 16%), 0 2px 5px 0 rgb(0 0 0 / 26%);  
   }
   
   #customButtonsWrap a:hover,  
   #customButtonsWrap a:active {  
     box-shadow: 0 5px 11px 0 rgb(0 0 0 / 18%), 0 4px 15px 0 rgb(0 0 0 / 15%);  
   }
   
   #customButtonsWrap .iw-icon-download:before {  
     position: relative;  
     top: 0.15rem;  
     font-size: 1.4rem;  
   }
   
   .customButtonText {  
     display: inline;  
     margin-right: 9px;  
   }  
 </style>
   
 <script type="text/javascript">  
   $(document).ready(function() {  
     // Remove notification trigger if present  
     var $notificationTrigger = $("a:contains('Notification Trigger')").parentsUntil(".additionalMedia-listItem").parent();  
     $notificationTrigger.remove();
   
        
       // Guest user - show login/subscribe button  
       if (iwRecordPage.recordID == 1297) {  
         var $button = $('<a href="/site/login" class="iocDocs downloadButton"><div class="customButtonText">Subscribe</div></a>');  
       } else {  
         var $button = $('<a href="/site/login" class="iocDocs downloadButton"><div class="customButtonText">Login To Download</div><i class="iw-icon-download"></i></a>');  
       }  
       $('#customButtonsWrap li').empty().append($button);  
     
   
     // Hide additional media section if empty or only showing selected item  
     var $additionalMedia = $("#dynamicWidgetZoneItem_75").find(".additionalMedia");  
     var $additionalMediaList = $additionalMedia.find(".additionalMedia-list");
   
     if ($additionalMediaList.children().length === 0 ||   
         ($additionalMediaList.children().length === 1 && $additionalMediaList.find('.selected').length === 1)) {  
       $additionalMedia.hide();  
     }  
   });  
 </script>  



/* ===========================
SEARCH LIST VIEW RECORD DETAILS - CUSTOM STYLING
Last Updated: 30/12/2025
Last Updated By: Alex Rayfield
=========================== */

{ if $record.Tournaments } Tournament: { $record.Tournaments } { /if } { if $record.Tournaments && $record.Season }     { /if } { if $record.Season } Year: { $record.Season } { /if }
{ if $record.Type } Type: { $record.Type } { /if }



/* ===========================
STANDARD SEARCH RESULTS RECORD PANE - CUSTOM STYLING
Last Updated: 30/12/2025
Last Updated By: Alex Rayfield
=========================== */

 { *
$record is a key value array of record metadata excluding field classes
e.g.  { $record['Field name'] } 

Field classes and their values are contained within $record['fieldClasses'] array
e.g.  { $record['fieldClasses']['title'] } 
e.g.  { $record['fieldClasses']['date'] } 
e.g.  { $record['fieldClasses']['summary'] } 

 { $record['recordID'] } ,  { $record['mediaObject'] }  and  { $record['mediaType'] }  are also set, although these may be null if no media object is found
The media used is always the first media object attached to the record
* } 

<ul class="record_pane_list flexView-expandDetailsList">

 { foreach from=$record key=fieldName item=value } 
 { if $fieldName eq 'guid' || $fieldName eq 'mediaObject' || $fieldName eq 'mediaType' || $fieldName eq 'recordID' || $fieldName eq 'Approval Status' || $fieldName eq 'Rights' || $fieldName eq 'fieldClasses' } 
 { continue } 
 { /if } 
 { if $value!="" }  
<li class="flexView-expandDetailsListItem">
<span class="field_name flexView-expandDetailsListItemField"> { $fieldName } :</span>
 { $value } 
</li>
 { /if }         
 { /foreach } 
</ul>



/* ===========================
RECORD METADATA VIEW - CUSTOM STYLING
Last Updated: 30/12/2025
Last Updated By: Alex Rayfield
=========================== */

<style>  
.tabViewer-content .btn--main,   
.tabViewer-content .metaData-listItemValue  {   
    border-radius: 4px !important;  
    padding: .25rem .5rem;  
    margin-bottom: 1px;  
    line-height: 1.3;  
 } 
  
.tabViewer-content .btn--main:hover  {   
    background-color: var(--c-primary-accent-dark-color, #1a1a1a);  
    color: white !important;  
 } 
  
.tabViewer-content .metadata-btnContainer,   
.metaData-listItem  {   
    padding-bottom: 0.25rem;  
 } 
  
.metaData-listItem  {   
    margin-bottom: 0.25rem;  
 } 
  
.metaData-listItemLabel  {   
    line-height: 1.2;  
 } 
  
.field_title_date  {   
    margin-bottom: 0.5rem;  
    text-align: center;  
 } 
  
.flex-group  {   
    display: flex;  
    gap: 5px;  
 } 
  
.flex-1  {  flex: 1;  }   
.flex-1-5  {  flex: 1.5;  }   
.flex-3  {  flex: 3;  } 
  
.text-center  {  text-align: center;  } 
  
.title-date-section  {   
    margin-bottom: 15px;  
    border-bottom: 1px solid #e0e0e0;  
    padding-bottom: 15px;  
 } 
  
.date-info  {   
    text-align: center;  
    margin-top: 10px;  
    font-size: 0.9rem;  
    font-style: italic;  
 }   
</style>
  
 { * Helper function to generate search URL * }   
 { function name="searchUrl" field="" value="" }   
/search/results#/?query= { $field } :&quot; { $value } &quot;&page=1&type=grid&sort=Imagen_Record_Creation_Date%20desc&filterBy=&spellCheck=true  
 { /function } 
  
 { * Helper function to check if field has valid value * }   
 { function name="hasValidValue" value="" }   
 { if $value && $value != 'None' } true { /if }   
 { /function } 
  
<ul>
  
 { * Title / Date Section * }   
 { assign var="iconClass" value="" }   
 { if $mediaData.type eq 'video' }   
     { assign var="iconClass" value="iw-icon-video" }   
 { elseif $mediaData.type eq 'audio' }   
     { assign var="iconClass" value="iw-icon-audio" }   
 { elseif $mediaData.type eq 'image' }   
     { assign var="iconClass" value="iw-icon-image" }   
 { elseif $mediaData.type eq 'document' }   
     { assign var="iconClass" value="iw-icon-document" }   
 { /if } 
  
 { assign var="has_title" value=$record|getFieldByClass:'title' }   
 { assign var="has_date" value=$record|getFieldByClass:'date' } 
  
 { if $has_title || $has_date }   
<div class="field_title_date title-date-section">  
     { if $has_title }   
        <div>  
             { if $iconClass } <i class=" { $iconClass } " style="margin-right: 2%;"></i> { /if }   
            <h3 style="display: inline; margin: 0;"> { $record|getFieldByClass:'title' } </h3>  
        </div>  
     { /if }   
     { if $has_date }   
        <div class="date-info">  
            <span>Uploaded:  { $record|getFieldByClass:'date'|full_date_format } </span>  
        </div>  
     { /if }   
</div>  
 { /if } 
  
 { * Players Field * }   
 { if $record.Players }   
<li class="field_Players metaData-listItem">  
    <div class="metadata-btnContainer">  
        <span class="field_label metaData-listItemLabel"> { $fieldNames['Players']|getDisplayName } </span>  
         { assign var="players_array" value=", "|explode:$record['Players'] }   
         { foreach from=$players_array item=player }   
        <a class="btn btn--main" href=" { searchUrl field='Players' value=$player } "><b> { $player } </b></a>  
         { /foreach }   
    </div>  
</li>  
 { /if } 
  
 { * Tournaments / Season Row * }   
 { if $record.Tournaments || $record.Season }   
<div class="flex-group">  
     { if $record.Tournaments }   
    <div class="flex-3">  
        <li class="field_Tournaments metaData-listItem">  
            <div class="metadata-btnContainer">  
                <span class="field_label metaData-listItemLabel"> { $fieldNames['Tournaments']|getDisplayName } </span>  
                 { assign var="tournaments_array" value=", "|explode:$record['Tournaments'] }   
                 { foreach from=$tournaments_array item=tournament }   
                <a class="btn btn--main" href=" { searchUrl field='Tournament' value=$tournament } "><b> { $tournament } </b></a>  
                 { /foreach }   
            </div>  
        </li>  
    </div>  
     { /if } 
      
     { if $record.Season }   
    <li class="field_Season metaData-listItem flex-1">  
        <span class="field_label metaData-listItemLabel"> { $fieldNames['Season']|getDisplayName } </span>  
        <span class="field_value metaData-listItemValue"> { $record.Season } </span>  
    </li>  
     { /if }   
</div>  
 { /if } 
  
 { * Host Course Name * }   
 { if $record.HostCourseName }   
<li class="field_HostCourseName metaData-listItem">  
    <div class="metadata-btnContainer">  
        <span class="field_label metaData-listItemLabel"> { $fieldNames['HostCourseName']|getDisplayName } </span>  
         { assign var="courses_array" value=", "|explode:$record['HostCourseName'] }   
         { foreach from=$courses_array item=course }   
        <a class="btn btn--main" href=" { searchUrl field='HostCourseName' value=$course } "><b> { $course } </b></a>  
         { /foreach }   
    </div>  
</li>  
 { /if } 
  
 { * Tour * }   
 { if $record.Tour }   
<li class="field_Tour metaData-listItem">  
    <div class="metadata-btnContainer">  
        <span class="field_label metaData-listItemLabel"> { $fieldNames['Tour']|getDisplayName } </span>  
         { assign var="tours_array" value=", "|explode:$record['Tour'] }   
         { foreach from=$tours_array item=tour }   
        <a class="btn btn--main" href=" { searchUrl field='Tour' value=$tour } "><b> { $tour } </b></a>  
         { /foreach }   
    </div>  
</li>  
 { /if } 
  
 { * Rights / Type Row * }   
 { if $record.Rights || $record.Type }   
<div class="flex-group">  
     { if $record.Rights }   
    <li class="field_Rights metaData-listItem flex-1">  
        <div class="metadata-btnContainer">  
            <span class="field_label metaData-listItemLabel"> { $fieldNames['Rights']|getDisplayName } </span>  
             { assign var="rights_array" value=", "|explode:$record['Rights'] }   
             { foreach from=$rights_array item=right }   
                 { assign var="lower_right" value=$right|lower }   
                 { if $lower_right|strpos:'http' !== false }   
                    <a class="btn btn--main" href=" { $right } " aria-label="View Asset Rights"><b>View Asset Rights</b></a>  
                 { else }   
                    <span class="field_value metaData-listItemValue"> { $right } </span>  
                 { /if }   
             { /foreach }   
        </div>  
    </li>  
     { /if } 
      
     { if $record.Type }   
    <li class="field_Type metaData-listItem flex-1">  
        <div class="metadata-btnContainer">  
            <span class="field_label metaData-listItemLabel"> { $fieldNames['Type']|getDisplayName } </span>  
             { assign var="types_array" value=", "|explode:$record['Type'] }   
             { foreach from=$types_array item=type }   
            <a class="btn btn--main" href=" { searchUrl field='Type' value=$type } "><b> { $type } </b></a>  
             { /foreach }   
        </div>  
    </li>  
     { /if }   
</div>  
 { /if } 
  
 { * Description / Language / Nationality Row * }   
 { if $record.Description || $record.Language || $record.Nationality }   
<div class="flex-group">  
     { if $record.Description }   
    <li class="field_description metaData-listItem flex-3">  
        <span class="field_label metaData-listItemLabel"> { $fieldNames['Description']|getDisplayName } </span>  
        <span class="field_value metaData-listItemValue"> { $record.Description } </span>  
    </li>  
     { /if } 
      
     { if $record.Language }   
    <li class="field_Language metaData-listItem flex-1">  
        <span class="field_label metaData-listItemLabel"> { $fieldNames['Language']|getDisplayName } </span>  
        <span class="field_value metaData-listItemValue"> { $record.Language } </span>  
    </li>  
     { /if } 
      
     { if $record.Nationality }   
    <li class="field_Nationality metaData-listItem flex-1">  
        <span class="field_label metaData-listItemLabel"> { $fieldNames['Nationality']|getDisplayName } </span>  
        <span class="field_value metaData-listItemValue"> { $record.Nationality } </span>  
    </li>  
     { /if }   
</div>  
 { /if } 
  
 { * Golf Specific Fields Row * }   
 { assign var="show_golf_row" value=false }   
 { if ($record.RoundNumber && $record.RoundNumber != 'None') || ($record.HoleNumber && $record.HoleNumber != 'None') || ($record.ParValue && $record.ParValue != 'None') || ($record.ShotNumber && $record.ShotNumber != 'None') || ($record.ShotType && $record.ShotType != 'None') }   
     { assign var="show_golf_row" value=true }   
 { /if } 
  
 { if $show_golf_row }   
<div class="flex-group">  
     { if $record.RoundNumber && $record.RoundNumber != 'None' }   
    <li class="field_RoundNumber metaData-listItem flex-1 text-center">  
        <span class="field_label metaData-listItemLabel">Round: <span style="font-weight: normal;"> { $record.RoundNumber } </span></span>  
    </li>  
     { /if } 
      
     { if $record.HoleNumber && $record.HoleNumber != 'None' }   
    <li class="field_HoleNumber metaData-listItem flex-1 text-center">  
        <span class="field_label metaData-listItemLabel">Hole #: <span style="font-weight: normal;"> { $record.HoleNumber } </span></span>  
    </li>  
     { /if } 
      
     { if $record.ParValue && $record.ParValue != 'None' }   
    <li class="field_ParValue metaData-listItem flex-1 text-center">  
        <span class="field_label metaData-listItemLabel">Par: <span style="font-weight: normal;"> { $record.ParValue } </span></span>  
    </li>  
     { /if } 
      
     { if $record.ShotNumber && $record.ShotNumber != 'None' }   
    <li class="field_ShotNumber metaData-listItem flex-1 text-center">  
        <span class="field_label metaData-listItemLabel">Shot #: <span style="font-weight: normal;"> { $record.ShotNumber } </span></span>  
    </li>  
     { /if } 
      
     { if $record.ShotType && $record.ShotType != 'None' }   
    <li class="field_ShotType metaData-listItem flex-1-5 text-center">  
        <span class="field_label metaData-listItemLabel"> { $fieldNames['ShotType']|getDisplayName } : <span style="font-weight: normal;"> { $record.ShotType } </span></span>  
    </li>  
     { /if }   
</div>  
 { /if } 
  
</ul>  



/* ===========================
RECORD PAGE - CUSTOM DOWNLOAD BUTTON
Last Updated: 30/12/2025
Last Updated By: Alex Rayfield
=========================== */

<ul id="customButtonsWrap">    
  <li>  
    <a href="#" id="downloadButton" class="iocDocs downloadButton">  
      <div class="customButtonText">Download</div>  
      <i class="iw-icon-download"></i>  
    </a>  
  </li>  
</ul>
  
<style>  
  .iwMenu_recordPage.IWmenu_link  {   
    bottom: calc(2rem + 8px);  
   } 
  
  .record-header-section  {   
    background: transparent;  
    margin-bottom: 0;  
   } 
  
  #customButtonsWrap  {   
    margin-left: auto;  
     { if $user.roleID ne null }   
    margin-right: 75px;  
     { /if }   
    width: auto;  
    float: right;  
    position: relative;  
    top: 6px;  
   } 
  
  @media (min-width: 68em)  {   
    #customButtonsWrap  {   
      top: 10px;  
     }   
   } 
  
  #customButtonsWrap li  {   
    display: inline-block;  
    margin-bottom: 2rem;  
   } 
  
  #customButtonsWrap a  {   
    margin: 0 0.3rem;  
    padding: 0.75rem 1.5rem;  
    border: none;  
    border-radius: 4px;  
    font-weight: bold;  
    color: var(--c-secondary-accent-font-color, #fff);  
    background-color: var(--c-primary-accent-dark-color, #1976d2);  
    transition: box-shadow .2s ease-out;  
    box-shadow: 0 2px 10px 0 rgb(0 0 0 / 16%), 0 2px 5px 0 rgb(0 0 0 / 26%);  
   } 
  
  #customButtonsWrap a:hover,  
  #customButtonsWrap a:active  {   
    box-shadow: 0 5px 11px 0 rgb(0 0 0 / 18%), 0 4px 15px 0 rgb(0 0 0 / 15%);  
   } 
  
  #customButtonsWrap .iw-icon-download:before  {   
    position: relative;  
    top: 0.15rem;  
    font-size: 1.4rem;  
   } 
  
  .customButtonText  {   
    display: inline;  
    margin-right: 9px;  
   }   
</style>
  
<script type="text/javascript">  
  $(document).ready(function()  {   
    // Remove notification trigger if present  
    var $notificationTrigger = $("a:contains('Notification Trigger')").parentsUntil(".additionalMedia-listItem").parent();  
    $notificationTrigger.remove();
  
     { if $user.isGuest eq "N" }    
      // Logged in user - add download button  
       { if $user.roleID ne null }   
        try  {   
          var $button = $('<a href="#" class="iocDocs downloadButton" data-linktext="Download" onclick="CISDownloadMedia.downloadMediaRequest(this, null); return false;" data-record-id="' + iwRecordPage.recordID + '" data-media-id="' + iwRecordPage.mediaID + '" data-additional-post-params=" {  } " data-download-url="/downloadmedia/download" data-error-callback="CISMetadataEditWidget.downloadMediaShowError" tabindex="0" data-anonymous-url=""><div class="customButtonText">Download</div><i class="iw-icon-download"></i></a>');
            
          $('#customButtonsWrap li').empty().append($button);  
         }  catch(e)  {   
          // If media ID not available, remove button  
          $('#customButtonsWrap').remove();  
         }   
       { /if }   
     { else }    
      // Guest user - show login/subscribe button  
      if (iwRecordPage.recordID == 1297)  {   
        var $button = $('<a href="/site/login" class="iocDocs downloadButton"><div class="customButtonText">Subscribe</div></a>');  
       }  else  {   
        var $button = $('<a href="/site/login" class="iocDocs downloadButton"><div class="customButtonText">Login To Download</div><i class="iw-icon-download"></i></a>');  
       }   
      $('#customButtonsWrap li').empty().append($button);  
     { /if } 
  
    // Hide additional media section if empty or only showing selected item  
    var $additionalMedia = $("#dynamicWidgetZoneItem_75").find(".additionalMedia");  
    var $additionalMediaList = $additionalMedia.find(".additionalMedia-list");
  
    if ($additionalMediaList.children().length === 0 ||   
        ($additionalMediaList.children().length === 1 && $additionalMediaList.find('.selected').length === 1))  {   
      $additionalMedia.hide();  
     }   
   } );  
</script>  



/* ===========================
Change Search Page Filter Slider as default secondary variable colour is white making slider disapear on white background 

=========================== */

<style>
.iw-range-slider-thumb, .iw-range-slider-line { background-color: var(--c-secondary-accent-color, #2196f3); } .iw-range-slider-track { background-color: #aeaeae;}
</style>