title: display image slider only on default page NopCommerce?
body: <p>I am using nopCommerce to build my site and i have added a simple jquery slider to the HeaderMenu.ascx page.</p>
  
  <p>However its showing up on everypage as the Master Page refers to the HeadMenu.ascx file.</p>
  
  <p>Whats the best way to ONLY show it in the default page?</p>
  
  <p><strong>default page:</strong></p>
  
  <pre><code>&lt;%@ Page Language="C#" MasterPageFile="~/MasterPages/TwoColumn.master" AutoEventWireup="true"
      Inherits="NopSolutions.NopCommerce.Web.Default" CodeBehind="Default.aspx.cs"
       %&gt;
  
  &lt;%@ Register TagPrefix="nopCommerce" TagName="HomePagePoll" Src="~/Modules/HomePagePoll.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="HomePageNews" Src="~/Modules/HomePageNews.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="HomePageCategories" Src="~/Modules/HomePageCategories.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="HomePageProducts" Src="~/Modules/HomePageProducts.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="BestSellers" Src="~/Modules/BestSellers.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="Topic" Src="~/Modules/Topic.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="RecentlyAddedProducts" Src="~/Modules/RecentlyAddedProducts.ascx" %&gt;
  
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="Server"&gt;
  
      &lt;nopCommerce:Topic ID="topicHomePageText" runat="server" TopicName="HomePageText"
          OverrideSEO="false"&gt;&lt;/nopCommerce:Topic&gt;
      &lt;div class="clear"&gt;
      &lt;/div&gt;
      &lt;nopCommerce:HomePageCategories ID="ctrlHomePageCategories" runat="server" /&gt;
      &lt;div class="clear"&gt;
      &lt;/div&gt;
      &lt;nopCommerce:BestSellers ID="ctrlBestSellers" runat="server" /&gt;
      &lt;div class="clear"&gt;
      &lt;/div&gt;
      &lt;nopCommerce:RecentlyAddedProducts ID="ctrlRecentlyAddedProducts" runat="server" /&gt;
      &lt;div class="clear"&gt;
      &lt;/div&gt;
      &lt;nopCommerce:HomePagePoll ID="ctrlPolls" runat="server" /&gt;
      &lt;div class="clear"&gt;
      &lt;/div&gt;
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>The above then points to the TwoColumn master page:</p>
  
  <pre><code>&lt;%@ Master Language="C#" MasterPageFile="~/MasterPages/Root.Master" AutoEventWireup="true" CodeBehind="TwoColumn.master.cs" Inherits="NopSolutions.NopCommerce.Web.MasterPages.TwoColumn" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="MiniShoppingCartBox" Src="~/Modules/MiniShoppingCartBox.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="CategoryNavigation" Src="~/Modules/CategoryNavigation.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="ManufacturerNavigation" Src="~/Modules/ManufacturerNavigation.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="InfoBlock" Src="~/Modules/InfoBlock.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="LiveChatBlock" Src="~/Modules/LiveChatBlock.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="RecentlyViewedProducts" Src="~/Modules/RecentlyViewedProductsBox.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="PopularTags" Src="~/Modules/PopularTags.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="NewsLetterSubscriptionBoxControl" Src="~/Modules/NewsLetterSubscriptionBoxControl.ascx" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server"&gt;
      &lt;div class="master-wrapper-side-2"&gt;
          &lt;asp:ContentPlaceHolder ID="cph2" runat="server"&gt;
              &lt;nopCommerce:NewsLetterSubscriptionBoxControl runat="server" ID="ctrlNewsLetterSubscriptionBoxControl" /&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
  
              &lt;div class="clear"&gt;
              &lt;/div&gt;
  
              &lt;div class="clear"&gt;
              &lt;/div&gt;
              &lt;nopCommerce:CategoryNavigation ID="ctrlCategoryNavigation" runat="server" /&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
  
              &lt;div class="clear"&gt;
              &lt;/div&gt;
  
          &lt;/asp:ContentPlaceHolder&gt;
      &lt;/div&gt;
      &lt;div class="master-wrapper-center-2"&gt;
          &lt;div class="master-wrapper-cph-2"&gt;
              &lt;asp:ContentPlaceHolder ID="cph1" runat="server"&gt;
              &lt;/asp:ContentPlaceHolder&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Which then points to the MasterPage:</p>
  
  <p>The master page contains the reference "HeaderMenu" which contains my css horizontal menu and jquery slider:</p>
  
  <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Root.Master.cs" Inherits="NopSolutions.NopCommerce.Web.MasterPages.root" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="Header" Src="~/Modules/Header.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="HeaderMenu" Src="~/Modules/HeaderMenu.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="Footer" Src="~/Modules/Footer.ascx" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="GoogleAdsense" Src="~/Modules/GoogleAdsense.ascx" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head id="Head1" runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;meta name="description" content="" /&gt;
      &lt;meta name="keywords" content="" /&gt;
      &lt;asp:PlaceHolder id="SCRIPTS" runat="server" /&gt;
      &lt;asp:PlaceHolder id="phAnalyticsHead" runat="server" /&gt;
  
  
  &lt;script type="text/javascript" 
          src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      // You may specify partial version numbers, such as "1" or "1.3",
      //  with the same result. Doing so will automatically load the 
      //  latest version matching that partial revision pattern 
      //  (e.g. 1.3 would load 1.3.2 today and 1 would load 1.6.1).
      google.load("jquery", "1.6.1");
  
      google.setOnLoadCallback(function () {
          // Place init code here instead of $(document).ready()
      });
  &lt;/script&gt;
  
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div class="master-wrapper-page"&gt;
          &lt;div class="master-wrapper-content"&gt;
              &lt;nopCommerce:Header ID="ctrlHeader" runat="server" /&gt;
              &lt;nopCommerce:HeaderMenu ID="ctrlHeaderMenu" runat="server" /&gt;
              &lt;asp:ContentPlaceHolder ID="cph1" runat="server"&gt;
              &lt;/asp:ContentPlaceHolder&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;nopCommerce:GoogleAdsense runat="server" ID="ctrlGoogleAdsense" /&gt;
          &lt;nopCommerce:Footer ID="ctrlFooter" runat="server" /&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;asp:PlaceHolder id="phAnalyticsBody" runat="server" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>AND finally below is my HeaderMenu page:</p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.HeaderMenuControl"
      CodeBehind="HeaderMenu.ascx.cs" %&gt;
  &lt;%@ Register TagPrefix="nopCommerce" TagName="SearchBox" Src="~/Modules/SearchBox.ascx" %&gt;
  &lt;script type="text/javascript"&gt;
      var page = window.location.pathname.split('/').pop();
  
      $('a[href$="' + page + '"]').parent().addClass('selected');
  
  
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
      function slideSwitch() {
          var $active = $('#slideshow IMG.active');
  
          if ($active.length == 0) $active = $('#slideshow IMG:last');
  
          var $next = $active.next().length ? $active.next()
          : $('#slideshow IMG:first');
  
          $active.addClass('last-active');
  
          $next.css({ opacity: 0.0 })
          .addClass('active')
          .animate({ opacity: 1.0 }, 1000, function () {
              $active.removeClass('active last-active');
          });
      }
  
      $(function () {
          setInterval("slideSwitch()", 5000);
      });
  
  
  &lt;/script&gt;
  
  
  
  
  &lt;div class="headermenu"&gt;
      &lt;div class="searchbox"&gt;
          &lt;nopCommerce:SearchBox runat="server" ID="ctrlSearchBox"&gt;&lt;/nopCommerce:SearchBox&gt;
      &lt;/div&gt;
      &lt;div id="nav"&gt;
          &lt;nav&gt;
   &lt;ul class="topmenu"&gt;
          &lt;li&gt;&lt;a id="current" href="&lt;%=CommonHelper.GetStoreLocation()%&gt;" class="home"&gt;&lt;%=GetLocaleResourceString("Content.HomePage")%&gt;&lt;/a&gt; &lt;/li&gt;
          &lt;% if (this.ProductService.RecentlyAddedProductsEnabled)
             { %&gt;
          &lt;li&gt;&lt;a href="&lt;%=Page.ResolveUrl("~/recentlyaddedproducts.aspx")%&gt;"&gt;
              &lt;%=GetLocaleResourceString("Products.NewProducts")%&gt;&lt;/a&gt; &lt;/li&gt;
          &lt;%} %&gt;
          &lt;li&gt;&lt;a href="&lt;%=Page.ResolveUrl("~/search.aspx")%&gt;"&gt;
              &lt;%=GetLocaleResourceString("Search.Search")%&gt;&lt;/a&gt; &lt;/li&gt;
          &lt;li&gt;&lt;a href="&lt;%= SEOHelper.GetMyAccountUrl()%&gt;"&gt;
              &lt;%=GetLocaleResourceString("Account.MyAccount")%&gt;&lt;/a&gt; &lt;/li&gt;
          &lt;% if (this.BlogService.BlogEnabled)
             { %&gt;
          &lt;li&gt;&lt;a href="&lt;%= SEOHelper.GetBlogUrl()%&gt;"&gt;
              &lt;%=GetLocaleResourceString("Blog.Blog")%&gt;&lt;/a&gt; &lt;/li&gt;
          &lt;%} %&gt;
          &lt;% if (this.ForumService.ForumsEnabled)
             { %&gt;
          &lt;li&gt;&lt;a href="&lt;%= SEOHelper.GetForumMainUrl()%&gt;"&gt;
              &lt;%=GetLocaleResourceString("Forum.Forums")%&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;%} %&gt;
          &lt;li&gt;&lt;a href="&lt;%=Page.ResolveUrl("~/contactus.aspx")%&gt;"&gt;
              &lt;%=GetLocaleResourceString("ContactUs.ContactUs")%&gt;&lt;/a&gt; &lt;/li&gt;
      &lt;/ul&gt;
      &lt;/nav&gt;
      &lt;/div&gt;
      &lt;%-- add the slider below the headerMenu--%&gt;
  
  &lt;div id="slideshow"&gt;
      &lt;img src="../App_Themes/darkOrange/images/dc/slider2/1.jpg" alt="" class="active" /&gt;
      &lt;img src="../App_Themes/darkOrange/images/dc/slider2/2.jpg" alt="" /&gt;
      &lt;img src="../App_Themes/darkOrange/images/dc/slider2/3.jpg" alt="" /&gt;
      &lt;img src="../App_Themes/darkOrange/images/dc/slider2/4.jpg" alt="" /&gt;
      &lt;img src="../App_Themes/darkOrange/images/dc/slider2/5.jpg" alt="" /&gt;
      &lt;img src="../App_Themes/darkOrange/images/dc/slider2/6.jpg" alt="" /&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>Sorry for the long email, couldnt explain it any other way...</p>