Page 1 of 2 12 LastLast
Results 1 to 10 of 25

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

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

    Try wrapping this logic in

    if ($this_is_home_page) {
    ...
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

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

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

    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) {
    ?>
    also tried
    Code:
    <?php
      if (SHOW_BANNERS_GROUP_SET3 != '' && $this_is_home_page && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
        if ($banner->RecordCount() > 0) {
    ?>
    No luck.
    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?

    I went a head and installed a fresh Zen 1.5.1 to test. I modified the following code at line 104 and I am getting the same results. Banner at position 3, below the footer, shows up on all pages.

    includes/templates/classic/common/tpl_main_page.php

    Code:
    <?php
      if ($this_is_home_page && 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
        }
      }
    ?>
    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?

    I thought the images of admin might help
    Click image for larger version. 

Name:	Image 4.jpg 
Views:	61 
Size:	18.7 KB 
ID:	12475
    Click image for larger version. 

Name:	Image 5.jpg 
Views:	58 
Size:	19.4 KB 
ID:	12476
    Using Zen Cart 1.5.1

  5. #5
    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?

    wrong banner?

    PHP Code:
    <?php
      
    if ($this_is_home_page && (SHOW_BANNERS_GROUP_SET4 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET4))) {

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

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

    I am using banner 3 for.

    What do you mean wrong banner?
    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
    I am using banner 3 for.

    What do you mean wrong banner?
    I meant different banner, but try the code I posted but for your chosen banner number of course.

  8. #8
    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 picandnix View Post
    I meant different banner, but try the code I posted but for your chosen banner number of course.
    Quote Originally Posted by picandnix View Post
    wrong banner?

    PHP Code:
    <?php
      
    if ($this_is_home_page && (SHOW_BANNERS_GROUP_SET4 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET4))) {
    I tried the following:
    PHP Code:
    <?php
      
    if ($this_is_home_page && (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
        
    }
      }
    ?>
    No it does not work. Thank you.
    Using Zen Cart 1.5.1

  9. #9
    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.

  10. #10
    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

 

 
Page 1 of 2 12 LastLast

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