Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

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

    How can you place html below the footer on the first page only?
    Using Zen Cart 1.5.1

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

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

    Can the html be placed on the index.php page only, below the footer?
    Using Zen Cart 1.5.1

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

    yes by using banner manager in your admin area, just add your html to your banner and set where you'd like it to display. There's a thread or it may have been a FAQ page too of how to set it to show on homepage only.

  4. #4
    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
    yes by using banner manager in your admin area, just add your html to your banner and set where you'd like it to display. There's a thread or it may have been a FAQ page too of how to set it to show on homepage only.
    Thank you for the reply.

    That could work for me, if I could make appear on the index first page only.
    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?

    I am revising the following in 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) {
    ?>
    from Linda's (Ajeh) Post but I am still getting the banner on all pages, below the footer.

    I am trying to make it show up on the first page / home page, below the footer only.
    Last edited by Kevin205; 10 May 2013 at 07:52 PM.
    Using Zen Cart 1.5.1

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

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

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

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

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

 

 
Page 1 of 3 123 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