Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    6,977
    Plugin Contributions
    27

    Default Hiding logo and navMain on homepage

    [FONT=Century Gothic]I've poured through this forum, and while I haven't found EXACTLY what I was looking for, I did find enough information to formulate my question.[/FONT]

    [FONT=Century Gothic]1st a link: [/FONT][FONT=Century Gothic]http://testsite.overthehillweb.com/zentest1/[/FONT]

    [FONT=Century Gothic]I want to hide the logo and the navMain from the home page only. I used a stylesheet for the index page to do this, but the issue as you can guess is that I discovered that this not only affects the "home" page, but all of the other index pages as well (category pages etc..) [/FONT][FONT=Century Gothic]http://testsite.overthehillweb.com/zentest1/index.php?main_page=index&cPath=1[/FONT][FONT=Century Gothic] So that idea is out the window.. [/FONT]

    [FONT=Century Gothic]So I'm back to where I started with hiding this on the "tpl_header.php". The thing is I tried hiding the entire header, but then my top inside rounded corners disappear.. I could live with this, but my cllient would rather not..[/FONT]

    [FONT=Century Gothic]So can I simply wrap the logoWrapper and navMain divs with this:[/FONT]
    Code:
    [FONT=Century Gothic]<?php if (!$this_is_home_page[/FONT][FONT=Century Gothic]) { >?[/FONT]
    [FONT=Century Gothic]your HTML button code[/FONT][FONT=Century Gothic];[/FONT]
    [FONT=Century Gothic]<?php } ?> [/FONT]
    [FONT=Century Gothic]I'm at work and can't try this out right now, so I thought I'd pose the question to see if I'm on the right track before I get home tonight. Hope one of the experts can chime in..[/FONT]

  2. #2
    Join Date
    Aug 2005
    Posts
    26,032
    Plugin Contributions
    9

    Default Re: Hiding logo and navMain on homepage

    Depending upon what the resulting look is - have a look at the tpl_main_page.php and you can toggle the header off and add and if for $this_is_home_page....

    Or you can create a dir in the custom template and I think this would be "home" or "index" and in that place your custom copies for the tpl_header.php and others

    One of these should get what you need
    Zen-Venom Get Bitten
    Get Your Business Found

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    6,977
    Plugin Contributions
    27

    Default Re: Hiding logo and navMain on homepage

    Quote Originally Posted by kobra View Post
    Depending upon what the resulting look is - have a look at the tpl_main_page.php and you can toggle the header off and add and if for $this_is_home_page....

    Or you can create a dir in the custom template and I think this would be "home" or "index" and in that place your custom copies for the tpl_header.php and others

    One of these should get what you need
    I actually started out this journey by turning off the header in the tpl_main_page.php file. It seemed to work.. Turned the header off, but th hidden header spoiled the rounded corners on the inside top part of the home page. So I decided to try not hiding the headerWrapper, but only hiding the elements within the headerWrapper (hence how I ended up creating the other stylesheet)

    But the directory inside the template sounds intriguing. If I do this, will the changes to tpl_header.php affect only the home page (which is what I do want) and leave all the other index pages with the logo and menu intact..

  4. #4
    Join Date
    Aug 2005
    Posts
    26,032
    Plugin Contributions
    9

    Default Re: Hiding logo and navMain on homepage

    But the directory inside the template sounds intriguing. If I do this, will the changes to tpl_header.php affect only the home page (which is what I do want) and leave all the other index pages with the logo and menu intact.
    This is what I suspect would happen ...
    I have not used it for the home page, hence why I am not sure of the dir name.
    I have used this for other pages like: the checkout pages and have these additional dir's directly under the custom template
    checkout
    checkout_shipping
    checkout_payment

    Pulling the name from part of what is displayed in the browser like:
    index.php?main_page=checkout&action=null

    The main I am not sure of but there are many posts about coding it as "home" but the dir might have to be "index"
    Zen-Venom Get Bitten
    Get Your Business Found

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    6,977
    Plugin Contributions
    27

    Default Re: Hiding logo and navMain on homepage

    Quote Originally Posted by kobra View Post
    This is what I suspect would happen ...
    I have not used it for the home page, hence why I am not sure of the dir name.
    I have used this for other pages like: the checkout pages and have these additional dir's directly under the custom template
    checkout
    checkout_shipping
    checkout_payment

    Pulling the name from part of what is displayed in the browser like:
    index.php?main_page=checkout&action=null

    The main I am not sure of but there are many posts about coding it as "home" but the dir might have to be "index"
    Sounds like the directory solution will not solve my problem.. I'll give it a shot, but my guess is that the result will be the same as when I used the index_home.css. Since "index" is in the URL of not only the home page, but the category pages as well.. **sigh**

    I have tried a ton of stuff, and it's like an ALL or NONE deal trying to gt this to work the way I'd like.. If I use the stylesheet option, it works PERFECT on the home page BUT (unfortunately) it also works on all of the category pages as well.. (not a desired effect)

    The only thing I've gotten to work is adding the code to the tpl_main_page.php file.. However I lose the top part of my inside rounded corners.. I don't know what to try next..

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    6,977
    Plugin Contributions
    27

    Default Re: Hiding logo and navMain on homepage

    Okay there is one more thing I can try.. but I don't know the proper syntax to modify this.. I found this little snippet
    Code:
    if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {
     $flag_disable_right = true;
    }
    I know that this code disables the right column if the category ID = 3. I think I need to do something similar.. Just need to figure out how to modify this so that if there is NO category ID in the URL, any divs within the headerWrapper divs would not display.. This would still display the headerWrapper div (which means my inside top rounded border still works), but the logoWrapper & navMain divs will remain invisible on the main page.. **sigh**

  7. #7
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    6,977
    Plugin Contributions
    27

    Default Re: Hiding logo and navMain on homepage

    Well after trying a BUNCH of stuff last night, I decided that's enough for me..

    I am going to seek some commercial assistance to see if I can get some traction on coming up with my desired solution before I go with just simply hiding the header.. I turned to a good friend who is totally proficient in PHP (unlike MOI) and will only charge me a nominal fee to take a stab at coming up with a solution -- if he can't help then there's always "Renta-A-Coder" I actually don't mind paying someone to get the solution I want..

    My friend got a kick outta my efforts to resolve this myself... When I turned to him for help he stated: "Hmmmm... so let me get this straight.. You're trying to program, and you're not a programmer.." What can I say.. I usually manage to figure these things out..

    I appreciate your responses Kobra.. I gave it a good old college try..

 

 

Similar Threads

  1. Hiding the top categories
    By maclancer in forum General Questions
    Replies: 0
    Last Post: 23 Jul 2007, 11:35 AM
  2. Hiding a catagory....
    By kevnj in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 7 Jun 2007, 12:51 AM
  3. hiding breadcrumbs if I am on the homepage failing
    By freef4ll in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 26 Mar 2007, 08:16 PM

Bookmarks

Posting Permissions

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