Welcome, Guest
Please Login or Register.    Lost Password?

patternbear - full width content section
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: patternbear - full width content section
#1063
patternbear - full width content section 3 Years, 9 Months ago Karma: 2
Is there an easy way to mod the template so that if nothing is published in Advert1 or Advert2, the content section goes to the full available width?

I want to put a "data widget" in a content item... but it will not display nicely within the existing content section.

Can an article reference a custom CSS page that replaces the current #left and #right-column items?

Thoughts / suggestions / references to other resources?

Thanks in advance.

Graydon
graydon
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1064
Re:patternbear - full width content section 3 Years, 9 Months ago Karma: 2
Had one thought - I guess I could make a duplicate of the template as I currently have it... mod the #left and #right-column items as I want them.... and then assign that template to the specific menu item that goes to the content article I want.

But then, any debug or changes have to be done twice...
graydon
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1066
Re:patternbear - full width content section 3 Years, 9 Months ago Karma: 2
found what I think will work...

the following (updated for J1.5 terminology) seems to work on my test site...

Code:


<?php if ( mosCountModules( 'right' ) <= 0)  { ?>
<style type="text/css" media=" screen">
#main-body {width:100%;}
#content{width:75%;}
#sidebar{width:25%;}
#sidebar-2{display:none;} </style>
<?php } ?>




I'll clarify more later.<br><br>Post edited by: graydon, at: 2008/07/27 06:00
graydon
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1067
Re:patternbear - full width content section 3 Years, 9 Months ago Karma: 2
OK, the quick and simple way to get your content section to go full width is to include the following in the head section of the html... after the original call to the css template.

Code:


&lt;?php if ( $this-&gt; countModules('advert1 + advert2') &lt;= 0 ) { ? &gt;
&lt;style type=&quot;text/css&quot; media=&quot; screen&quot;&gt;
#left {width:990px;}
#right-column{display:none;} &lt;/style&gt;
&lt;?php } ?&gt;



I also updated the right-column div structure with the second &quot;if&quot; configuration as I think it's needed to ensure that advert2 isn't &quot;published&quot; unless there is something in there.

Code:


&lt;div id=&quot;right-column&quot;&gt;
  &lt;div id=&quot;right-content&quot;&gt;
  &lt;?php if($this-&gt;countModules('advert1'))  : ?&gt;
    &lt;div id=&quot;module1-336banner&quot;&gt; &lt;jdoc:include type=&quot;modules&quot;  name=&quot;advert1&quot; style=&quot;xhtml&quot;  /&gt;&lt;/div&gt;
&lt;?php endif; ?&gt;
 
  &lt;?php if($this-&gt;countModules('advert2'))  : ?&gt;
    &lt;div id=&quot;module2-336banner&quot;&gt; &lt;jdoc:include type=&quot;modules&quot;  name=&quot;advert2&quot; style=&quot;xhtml&quot;  /&gt;&lt;/div&gt;
&lt;?php endif; ?&gt;

  &lt;/div&gt;
    &lt;/div&gt;

graydon
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: Support
 
JOOMLA TEMPLATES Joomla Templates By JoomlaBear