Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    May 2011
    Posts
    10
    Plugin Contributions
    0

    Default problem with index page??

    Hi i am new to zencart and i am having trouble to find the code of tpl_main_page.php and tp_header.php of my index page

    all other pages else index page are linked in my theme common folder that contains tpl_main_page.php and tpl_header.php

    I am struggling so much to find the code of that thingh?? please help....

  2. #2
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: problem with index page??

    If you are new to zen cart, you SHOULD NOT touch the tpl_main_page as it controls the whole website not only the index page. Any edits to the tpl_html_header should only be performed if you are certain of what you are doing and already have backup.

    There is no such thing as tpl_main_page for the home page. Home page has it's own template file tpl_index_default.

  3. #3
    Join Date
    May 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: problem with index page??

    hello sir you are right but i have a good knowledge of php so it doesn't matter so much
    all i want to know is wuhy the index page is different from all other page and why its not taking tpl_header.php and tpl_main_page.php from my theme i selected that is not template_default
    i select custom theme
    now all i want to know is from where my index page is selecting header and main page code
    if you have any idea about that plaease help sir

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: problem with index page??

    We would need to see your site to know what your setup is.
    Let's continue the discussion in this thread only, and not in the other thread where you posted the identical question.

  5. #5
    Join Date
    May 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: problem with index page??

    actually i am new forum so i mistakely post it at that place and i dont know how to delete it now...........

    ok the site is http://w w w.p o o l s p l u s p a t i o.c o m/index.php?main_page=shop and i put spaces here beacause i dont want to list it on search engine please remove spaces to check it this is the link of other page

    http://w w w.p o o l s p l u s p a t i o.c o m/index.php?main_page=index this is the link of home page and now for check see the rss and facebook and twitter link

    when i change tpl_header.php in my custom template its effect on all the page other than home page and you can see the difference by clicking on facebook and twitter link

    i want to know why index page is not accepting the changes i made in my custom template tpl_header.php and from where its actually taking its code.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: problem with index page??

    Not sure what is happening yet, but I do notice that your home page has no HTML <body> element in its view source:
    HTML Code:
    </script>
    </head>
    
    <div class="header_pad"><div class="header_pad_left">
      <div style="margin:0 auto;padding-left:775px;">
      <!--// bof: currencies //-->
    The Online Shop page is okay:
    HTML Code:
    </script>
    </head>
    
    <body id="shopBody">
    
    <div class="header_pad"><div class="header_pad_left">
      <div style="margin:0 auto;padding-left:775px;">
      <!--// bof: currencies //-->
    as is a category page:
    HTML Code:
    </script>
    </head>
    
    <body id="indexBody">
    
    <div class="header_pad"><div class="header_pad_left">
      <div style="margin:0 auto;padding-left:775px;">
      <!--// bof: currencies //-->
    You should have
    <body id="indexHomeBody">
    in the home page source.
    Last edited by gjh42; 14 May 2011 at 04:14 PM.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: problem with index page??

    What do you have in your template copy of tpl_main_page.php around the <body id=" line?

  8. #8
    Join Date
    May 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: problem with index page??

    sir i have this code in my tpl_main_page.php

    <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: problem with index page??

    For reference, the stock version of tpl_main_page.php has
    PHP Code:
      $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
    ?>
    <body id="<?php echo $body_id 'Body'?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'?>>
    What does your
    $body_id =
    line look like?

  10. #10
    Join Date
    May 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: problem with index page??

    sir i have this code above body tag in my tpl_main_page.php

    if($this_is_home_page)
    {
    include DIR_WS_TEMPLATE."common/splash.php";
    exit();
    }

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }


    $header_template = 'tpl_header.php';
    $footer_template = 'tpl_footer.php';
    $left_column_file = 'column_left.php';
    $right_column_file = 'column_right.php';
    $single_column_file = 'column_single.php';
    $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
    ?>

    is this code creating the problem???

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v138a problem with the index page in Opera
    By kobra8 in forum General Questions
    Replies: 2
    Last Post: 12 Mar 2012, 10:33 AM
  2. Problem redirect after login on site with html index page
    By brianosc in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 May 2008, 03:06 PM
  3. problem with index page
    By bestbuyz in forum General Questions
    Replies: 1
    Last Post: 25 Feb 2008, 10:43 PM
  4. Problem with homepage (index.php) is being forwarded to another page
    By elegantfragrances in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 8 Dec 2006, 03:52 PM
  5. Problem with homepage (index.php) is being forwarded to another page
    By elegantfragrances in forum General Questions
    Replies: 1
    Last Post: 8 Dec 2006, 02:55 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