[support] issue with forums and my template

Brett Evanson brettev at gmail.com
Sun Apr 27 03:56:43 UTC 2008


sorry i'm just getting back on this. neither of those links worked. i got
page not found.

On Thu, Apr 24, 2008 at 3:48 PM, Mike Johnston <shockedoctopus at gmail.com>
wrote:

> the link i should have sent is http://shockedoctopus.com/uieforum
>
>
> On Thu, Apr 24, 2008 at 3:42 PM, Mike Johnston <shockedoctopus at gmail.com>
> wrote:
>
> > Here's what it looks like, FYI. Tried your page.tpl.php and there was no
> > change.
> > You can see my issue here: http://shockedoctopus.com/forum
> >
> >
> > On Thu, Apr 24, 2008 at 2:48 PM, Brett Evanson <brettev at gmail.com>
> > wrote:
> >
> > > Try this one. Seems the page.tpl.php is aware of $node, but only when
> > > it's viewing a single node page. So the stuff I put in will only take the
> > > sidebars off when it is a single forum node. Haven't tried it, but give it a
> > > whirl and see.
> > >
> > > Brett
> > >
> > >
> > > On Thu, Apr 24, 2008 at 2:00 PM, Steve Edwards <killshot91 at comcast.net>
> > > wrote:
> > >
> > > >  According to Chapter 8 of my handy-dandy 'Pro Drupal Development'
> > > > book, $node is available in page.tpl.php (see top pf page 118).
> > > >
> > > > Steve
> > > >
> > > > Brett Evanson wrote:
> > > >
> > > > you can't add it to your page.tpl file because it isn't aware of
> > > > $node. if you are using pathauto and making all forum topics have a specific
> > > > prefix, you could filter on that prefix, but that would be in the block
> > > > visibility still. If you want to do it in the page.tpl file, you could do
> > > > something like this:
> > > >
> > > > $thenode = node_load(arg(1));
> > > > if($thenode->type != 'forum'){
> > > > //print sidebar
> > > > }
> > > >
> > > > but that is going to cause an extra node to load on the server. not
> > > > a big deal on small sites, but if it gets big, you're going to want to do it
> > > > another way.
> > > >
> > > > Brett
> > > >
> > > > On Thu, Apr 24, 2008 at 12:24 PM, Mike Johnston <
> > > > shockedoctopus at gmail.com> wrote:
> > > >
> > > > > Thanks for the help Brett. Here's what i tried adding to my
> > > > > page.tpl.php and page-front.tpl.php (the bolded area) but it doesn't seem to
> > > > > be working:
> > > > >
> > > > >  <div id="secondary">
> > > > >       <?php if ($sidebar_left_featured) { print "<div
> > > > > class='sidebar-featured'>$sidebar_left_featured</div>"; } ?>
> > > > >       <?php if ($sidebar_left) { print $sidebar_left; } ?>
> > > > >       *<?php if ($node->type == 'forum') return false; ?>*
> > > > >     </div>
> > > > >     <div id="tertiary">
> > > > >       <?php if ($sidebar_right) { print $sidebar_right; } ?>
> > > > >       *<?php if ($node->type == 'forum') return false; ?>*
> > > > >     </div>
> > > > >
> > > > > On Thu, Apr 24, 2008 at 12:03 PM, Brett Evanson <brettev at gmail.com>
> > > > > wrote:
> > > > >
> > > > > > probably in the block visibility for whatever block you don't
> > > > > > want to show.
> > > > > >
> > > > > > Brett
> > > > > >
> > > > > >
> > > > > > On Thu, Apr 24, 2008 at 11:38 AM, Mike Johnston <
> > > > > > shockedoctopus at gmail.com> wrote:
> > > > > >
> > > > > > > Dumb question time (i'm bad with php).. does this go somewhere
> > > > > > > in my page.tpl.php or template.php?
> > > > > > >
> > > > > > > On Thu, Apr 24, 2008 at 10:29 AM, Brett Evanson <
> > > > > > > brettev at gmail.com> wrote:
> > > > > > >
> > > > > > > > You could put some logic in your template file to check if
> > > > > > > > the current page is the forum, or you could put logic in the blocks to not
> > > > > > > > show on forum pages. Should be something like
> > > > > > > > if($node->type == 'forum') return false;
> > > > > > > >
> > > > > > > > Brett
> > > > > > > >
> > > > > > > >  On Thu, Apr 24, 2008 at 10:18 AM, Mike Johnston <
> > > > > > > > shockedoctopus at gmail.com> wrote:
> > > > > > > >
> > > > > > > > > I'm using the drupal efficient theme located here:
> > > > > > > > > themesnap.com and whenever i try to go to my forums page,
> > > > > > > > > it crams it in the far left column but leaves the two right sidebars on. Is
> > > > > > > > > there a way to remove the sidebars from this particular view only so that
> > > > > > > > > the forums display correctly? You can see what I mean here:
> > > > > > > > > http://shockedoctopus.com/phpbbforum/
> > > > > > > > >
> > > > > > > > >  --
> > > > > > > > > [ Drupal support list | http://lists.drupal.org/ ]
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Brett Evanson
> > > > > > > > --
> > > > > > > > [ Drupal support list | http://lists.drupal.org/ ]
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > [ Drupal support list | http://lists.drupal.org/ ]
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Brett Evanson
> > > > > >
> > > > > > --
> > > > > > [ Drupal support list | http://lists.drupal.org/ ]
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > [ Drupal support list | http://lists.drupal.org/ ]
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Brett Evanson
> > > >
> > > >
> > > > --
> > > > [ Drupal support list | http://lists.drupal.org/ ]
> > > >
> > >
> > >
> > >
> > > --
> > > Brett Evanson
> > > brettev at gmail.com
> > > 801-599-0584
> > >
> > > --
> > > [ Drupal support list | http://lists.drupal.org/ ]
> > >
> >
> >
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
Brett Evanson
brettev at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080426/b619c99c/attachment.htm 


More information about the support mailing list