Results 1 to 10 of 25

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by swguy View Post
    Try wrapping this logic in

    if ($this_is_home_page) {
    ...
    The opening bracket is missing in your conditional statement..

    Quote Originally Posted by Kevin205 View Post
    I tried
    Code:
    <?php
      if (($this_is_home_page) && SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
        if ($banner->RecordCount() > 0) {
    ?>
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by DivaVocals View Post
    The opening bracket is missing in your conditional statement..
    Where would the } close?
    Using Zen Cart 1.5.1

  3. #3
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by DivaVocals View Post
    The opening bracket is missing in your conditional statement..
    PHP Code:
    <?php
    if ($this_is_home_page) { 
      if (
    SHOW_BANNERS_GROUP_SET3 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET3)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    }
    ?>
    Unless, I have written it wrong, it is not good.
    Using Zen Cart 1.5.1

  4. #4
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Click image for larger version. 

Name:	Image 6.jpg 
Views:	81 
Size:	18.5 KB 
ID:	12477

    I just found out something, when I place the Wide-Banner to Header Position 3, and with the following code, it works.

    PHP Code:
    <?php
    if ($this_is_home_page) { 
      if (
    SHOW_BANNERS_GROUP_SET3 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET3)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    }
    ?>

    Banner shows up in Header Position 3 on the index page and NOT on all other pages. (The code works)

    But, the Footer Position 3 Wide-Banner shows up on all pages.

    How is the footer section controlled?
    Using Zen Cart 1.5.1

  5. #5
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Problem solved.

    It is SHOW_BANNERS_GROUP_SET6 and not SHOW_BANNERS_GROUP_SET3

    PHP Code:
    <!--bof- banner #6 display -->
    <?php
    if ($this_is_home_page) { 
      if (
    SHOW_BANNERS_GROUP_SET6 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET6)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerSix" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    }
    ?>
    <!--eof- banner #6 display -->
    It works fine now.

    Thank you picandnix, swguy and DivaVocals.
    Using Zen Cart 1.5.1

  6. #6
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    By the way Ajeh's and picandnix's original suggestion works fine also. The numbers got me confused. In the admin I think it should be called positions 1 through 6. But I am sure there are a lot of other things to consider!

    PHP Code:
    <!--bof- banner #6 display -->
    <?php
      
    if ($this_is_home_page && SHOW_BANNERS_GROUP_SET6 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET6)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerSix" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    ?>
    <!--eof- banner #6 display -->
    That was a nice 5 hours.
    Last edited by Kevin205; 10 May 2013 at 11:38 PM.
    Using Zen Cart 1.5.1

  7. #7
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by Kevin205 View Post
    That was a nice 5 hours.
    Well done

  8. #8
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    How can this be repeated and duplicated, so a different banner gets generated for different categories?

    Can you have different banners for different category pages?
    Using Zen Cart 1.5.1

 

 

Similar Threads

  1. In an EZ-Page, can I put a link to a popup of other content?
    By cstahlhut in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Aug 2012, 09:46 AM
  2. How to put the content below images on the home page?
    By ashadweb in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Sep 2010, 11:29 AM
  3. Can I put sidebox content into an EZ-Page?
    By makenoiz in forum General Questions
    Replies: 1
    Last Post: 8 Feb 2010, 03:10 AM
  4. Trying to add custom HTML content to the index page only.
    By inthecomputer in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 23 Jun 2008, 11:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg