Hide breadcrumb in Matrix theme but only for Custom HTML module pages?

Dozza
Dozza's picture

Joined: 2007-08-28
Posts: 112
Posted: Thu, 2011-12-08 11:37

Regarding my cient's site at http://www.milliepilkington.co.uk

This matrix G2 site, set up quite a few years ago, includes quite a few customisations, including the HTML module (http://codex.gallery2.org/Gallery2:Modules:html) which has allowed me to create 4 static html pages as follows (all available from the custom top horizontal navbar)

http://www.milliepilkington.co.uk/About
http://www.milliepilkington.co.uk/Testimonials
http://www.milliepilkington.co.uk/Links
http://www.milliepilkington.co.uk/News

I have also implemented a custom homepage at http://www.milliepilkington.co.uk/index.htm which I use in preference to main.php which looks quite ugly.

Unfortunately, when viewing the above custom html pages created using the html module, the breadcrumb or navigator trail that is displayed (that appears below the logo top left) then links to /main.php where it shows the 'ugly' layout for the root gallery (Millie Pilkington Photography). I DO want the breadcrumb or navigator trail to appear for all the 'client galleries' as some of these galleries are nested 5 levels deep and it helps the user dip in and out of the client galleries.

In a nutshell, I want to remove the 'Millie Pilkington Photography' breadcrumb / navigator trail all on the cutom html pages, so that end users can't get to /main.php

alecmyers showed me how to hide the sidebar for these pages at http://gallery.menalto.com/node/101274 and i'm wondering if I can implement some similar conditional statement to hide the breadcrumb / navigator on custom html pages.

Appreciate any advice or guidance as conditional php coding is not my forté.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-12-08 13:11
{if $theme.moduleL10Domain == 'modules_html'}
  {literal}
    <style> .block-core-BreadCrumb { display: none; } </style>
  {/literal}
{/if}

in theme.tpl just before </head>

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Dozza
Dozza's picture

Joined: 2007-08-28
Posts: 112
Posted: Thu, 2011-12-08 17:52

Suprsidr
That's very magnanimous of you and appreciated.

Your code does exactly what I want, except it collapses the space occupied by div.block-core-BreadCrumb which is not ideal. It brings the bottom keyline up into the phone number. Can we hide the div and replace with something that has a block height?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-12-08 18:15

for mine the admin links keep the space @34px; add: #gsNavBar { height: 34px; }

{if $theme.moduleL10Domain == 'modules_html'}
  {literal}
    <style> 
      .block-core-BreadCrumb { display: none; }
      #gsNavBar { height: 34px; }
    </style>
  {/literal}
{/if}

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Dozza
Dozza's picture

Joined: 2007-08-28
Posts: 112
Posted: Fri, 2011-12-09 15:05

Suprsidr

You are indeed 'supr'

Many thanks - you've come to the rescue again - much appreciated. I've got to find some time for more PHP knowledge and smarty templating....

 
eliz82

Joined: 2009-11-06
Posts: 71
Posted: Sat, 2011-12-10 15:58
Dozza wrote:
it collapses the space occupied by div.block-core-BreadCrumb

you can use visibility: hidden;
here is a comparation between them
http://www.w3schools.com/css/css_display_visibility.asp
.
_____________
my G2 site

 
Dozza
Dozza's picture

Joined: 2007-08-28
Posts: 112
Posted: Mon, 2011-12-12 15:58

eliz82

Thanks for your input.

I agree that that is a preferable solution, but for some reason it makes the whole page display as a white page when I try to use {visibility: hidden;} rather than {display:none;}

Not sure why though