bars but not included in tpl.php
Posted by thumbslinger on February 4, 2013 at 9:43pm
Following is my code for a specific page. Why/how can the $classes variable be showing 'one-sidebar sidebar-first' in Firebug/Chrome inspector etc when I am not calling for those areas?
I am trying to replace the body background-color css based on the page being viewed so in this first step I was examining the body tag and all the classes assigned.
That will be a different post, but seeing the classes 'one-sidebar sidebar-first' is bugging me. Where else or how else can those be getting included?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://http://www.zjjv.com///TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://http://www.zjjv.com///1999/xhtml" xml:lang="" lang="" dir="">
<head>
<title></title>
</head>
<bodycolor: #000000">">
<div><a href="#main-menu"></a></div>
<div>
<div>
<div>
<div>
<div> </div>
</div>
<!-- /.section, /#navigation -->
<div>
<a href="" title=""><img src="" alt="company logo: replace this text" /></a>
<!-- this is site search in upper right -->
<div></div>
<!-- ####################MAIN NAVIGATION WHICH IS A BLOCK NOT ASSIGNED TO A SPECIFIC REGION ##################-->
<!-- this is the snippet to place a block anywhere. Is 2013 New main navigation -->
</div><!-- the sma inv search is a block in the header section -->
</div>
<!-- /.section, /#header -->
<div>
<divcolor: #000000">">
<!-- <div><div>-->
<!-- the below div and php call pull in the existing main center content from the current site -->
<div>
<div><img src="/images/slideshow-fpo.png" alt=""> </div>
<div> <img src="/images/lcds/lcds-front-promo-strength.png" alt="lcs"/> <img src="/images/lcds/lcds-front-promo-all-lcd.png" alt=""/> <img src="/images/lcds/lcds-front-promo-backlit.png" alt=""/> </div>
</div>
</div>
</div>
<div><div>
<div></div>
</div></div><!-- /.section, /#footer -->
</div></div><!-- /#page, /#page-wrapper -->
</body>
</html>
Comments
Posted by nevets on February 4, 2013 at 10:27pm
Do you have any blocks in the sidebar?
Login or register to post comments
Posted by thumbslinger on February 4, 2013 at 10:32pm
Nope. I don't have sidebars in my new layout. The regions are there in the info file, but no active content is within the sidebars in this new theme. Those two blocks that I'm placing via the php snippet are not specified to any region.
Login or register to post comments
Posted by bitradiator on February 4, 2013 at 10:50pm
<bodycolor: #000000">">
Is the line in your template that prints the CSS classes. As you make changes to your theme settings and/or .info file in your theme the contents of this array should change to reflect them.
--BitRadiator
Login or register to post comments
Posted by thumbslinger on February 4, 2013 at 11:11pm
yes, that's what I thought, but the $classes (just renamed $body_classes) should only be reporting what is reflected from the xx-page.tpl.php, right? Those class names are specific to regions called, not just generic classes for anything so if I'm not calling those sidebars, how are classes specific to the sidebars included?
I've flushed the cache.
I can maybe get around it, I was just wondering how those specific classes are added when the content reliant upon them is not.
Login or register to post comments
Regarding
should only be
Posted by nevets on February 4, 2013 at 11:13pm
Regarding
should only be reporting what is reflected from the xx-page.tpl.php, right?
No, the class names reflect the regions with blocks in them, not if you have the regions present in the tpl.php file.
Login or register to post comments
Posted by thumbslinger on February 5, 2013 at 12:22am
I do not have any content assigned to any side bars whatsoever. I've removed the "print $classes" and just added an id within the xx-page.tpl.php but this is not working because of browser cache.
I'm just trying to rewrite the css used on the body tag based on the page loaded. Because that $classes variable is adding an ID plus 13 classes, it's not possible to override all that w/o resorting to bad css using important! or using jquery to force the styles, which isn't correct either.
I need to somehow define $classes specifically for the page being served rather than 'adding on' or trying to over-specify the $classes variable for all other pages.
I realize that is a different question as I alluded to in my original post, but perhaps, since this is all related keeping it here makes sense and if you have any ideas, I'd appreciate hearing them.
Login or register to post comments
Posted by bitradiator on February 5, 2013 at 12:54am
This looks like a discussion you might find interesting and api.drupal.org has a ton of relevant info.
--BitRadiator
Login or register to post comments