Hello,
I'm running Drupal 4.7.4 on this site: http://beta.menashalibrary.org/.
I'm going to have three distinct areas of the site. The main part, teens, and kids. For teens and kids, I've got the module Sections setup. So, I'll have a completely different theme for each area. What I'd also like to do, is to have different Primary Links for each of these areas.
Is this possible? If so, how?
- jody
Ps- sorry for the double post. Since my last thread got hijacked, I wanted to repost.
On Dec 5, 2006, at 8:48 AM, Jody Cleveland wrote:
Hello,
I'm running Drupal 4.7.4 on this site: http:// beta.menashalibrary.org/.
I'm going to have three distinct areas of the site. The main part, teens, and kids. For teens and kids, I've got the module Sections setup. So, I'll have a completely different theme for each area. What I'd also like to do, is to have different Primary Links for each of these areas.
Is this possible? If so, how?
Perhaps the easiest way: Primary links are just menus. Each menu has its own block. Display the block in the theme zone you want (or define your own) and then have the blocks display according to path or php test. With css, you can get the menus to display properly.
I hope this is helpful.
Best, Laura
Hello,
Perhaps the easiest way: Primary links are just menus. Each menu has its own block. Display the block in the theme zone you want (or define your own) and then have the blocks display according to path or php test. With css, you can get the menus to display properly.
Ok, I have a menu called teenzone. Under administer > blocks, I have that menu enabled. If I set it to show in the left sidebar only on pages teens/ teens/* it shows fine on the left side. If I set it to header, it isn't visible anywhere. Also, I'm not seeing anywhere I can 'turn off' primary links for that section. I see it listed under blocks, but it's disabled. But, it still shows up. Is there something else I need to do?
- jody
On Dec 5, 2006, at 9:48 AM, Jody Cleveland wrote:
Hello,
Perhaps the easiest way: Primary links are just menus. Each menu has its own block. Display the block in the theme zone you want (or define your own) and then have the blocks display according to path or php test. With css, you can get the menus to display properly.
Ok, I have a menu called teenzone. Under administer > blocks, I have that menu enabled. If I set it to show in the left sidebar only on pages teens/ teens/* it shows fine on the left side. If I set it to header, it isn't visible anywhere. Also, I'm not seeing anywhere I can 'turn off' primary links for that section. I see it listed under blocks, but it's disabled. But, it still shows up. Is there something else I need to do?
You will need to edit your page.tpl.php file in your theme. As for why blocks don't show up at all in your $header area probably relates to your theme as well. What theme are you using? Is it a 4.7 theme? The availability of zones to put your blocks was a new feature in 4.7, so if you have a legacy theme from 4.6 days, it might be missing some necessary code.
More here: http://drupal.org/phptemplate
Laura
You will need to edit your page.tpl.php file in your theme. As for why blocks don't show up at all in your $header area probably relates to your theme as well. What theme are you using? Is it a 4.7
theme?
The availability of zones to put your blocks was a new feature in 4.7, so if you have a legacy theme from 4.6 days, it might be missing some necessary code.
Whilst in Administer > blocks, for my template I see left sidebar, content, right sidebar, and footer. If I look at bluemarine, I see header. So, it's got to be a problem with the template. The one I'm using is a modified version of Multiflex: http://drupal.org/project/multiflex
I looked at the handbook for page.tpl.php, but I don't see what tells the template to display in the header area. But, looking at page.tpl.php in bluemarine, I notice this: <?php print $header ?>
Is that all I need to add into my template?
- jody
On Dec 5, 2006, at 1:22 PM, Jody Cleveland wrote:
You will need to edit your page.tpl.php file in your theme. As for why blocks don't show up at all in your $header area probably relates to your theme as well. What theme are you using? Is it a 4.7
theme?
The availability of zones to put your blocks was a new feature in 4.7, so if you have a legacy theme from 4.6 days, it might be missing some necessary code.
Whilst in Administer > blocks, for my template I see left sidebar, content, right sidebar, and footer. If I look at bluemarine, I see header. So, it's got to be a problem with the template. The one I'm using is a modified version of Multiflex: http://drupal.org/project/multiflex
I looked at the handbook for page.tpl.php, but I don't see what tells the template to display in the header area. But, looking at page.tpl.php in bluemarine, I notice this: <?php print $header ?>
Is that all I need to add into my template?
Yes. How it gets styled will depend upon the stylesheets, and where you place that print function.
Laura
Yes. How it gets styled will depend upon the stylesheets, and where you place that print function.
Ok, so in my page.tpl.php, I had this:
<!-- Navigation Level 2--> <div class="nav2"> <?php if (is_array($primary_links)) : ?> <ul> <?php foreach ($primary_links as $link): ?> <li> <?php print $link?> </li> <?php endforeach; ?> </ul> <?php endif; ?> </div>
Which, I replaced with this:
<!-- Navigation Level 2--> <div class="nav2"> <ul> <li> <?php print $header ?> </li> </ul> </div>
Then, in Administer > Blocks, I enabled the teen zone menu, and placed it in header. It does show up. However, it looks a bit off. I know I'll need to do some tweaking in the stylesheet, but there are a few things I'm confused on. Since it's a menu, it's adding in some extra stuff just like it normally does when it's on the left. Namely, the title of the menu. Here's the source code generated:
<p class="sidebar-title-noshade bg-blue07"> Teen Zone</p> <div class="sidebar-txtbox-noshade bg-grey03 mainmenu"> <ul> <li></li> </ul>
How do I control what gets displayed for that one menu? The biggest thing is I don't want this <p class="sidebar-title-noshade bg-blue07">Teen Zone</p>
Thank you for everyone's time in helping me with this.
- jody
On Dec 6, 2006, at 9:05 AM, Jody Cleveland wrote:
How do I control what gets displayed for that one menu? The biggest thing is I don't want this <p class="sidebar-title-noshade bg-blue07">Teen Zone</p>
There are a couple of ways to do this. One is to use or add divs holding your $header display, so you can use regular block classes, or you can write rules for specific blocks. Each block has an id, which you can see in reveal codes on the rendered page.
Either way, you can then override the default formatting for the blocks in that area. Such as:
#block-menu-foo h2 { display: none; }
This would hide the display of the header (title) of the block with the ID block-menu-foo.
For the paragraph content you mention, you can hide it by adding:
p.sidebar-title-noshade.bg-blue07 { display: none; }
I'm not sure why a block would have "sidebar" in its classes as it's not very semantic, but I'm not familiar with that theme.
Laura
On Wednesday 06 December 2006 08:05, Jody Cleveland wrote:
<p class="sidebar-title-noshade bg-blue07"> Teen Zone</p> <div class="sidebar-txtbox-noshade bg-grey03 mainmenu"> <ul> <li></li> </ul>
How do I control what gets displayed for that one menu? The biggest thing is I don't want this <p class="sidebar-title-noshade bg-blue07">Teen Zone</p>
Thank you for everyone's time in helping me with this.
- jody
Instead of using menus, create blocks that have the menu items in them. Set the Input formats to either PHP Code or Full HTML (probably the latter) and specify a <div> class that you then modify in your stylesheet.
On Tuesday 05 December 2006 12:22, Jody Cleveland wrote:
[ s n i p ]
I looked at the handbook for page.tpl.php,
Try reading through this one, too: http://drupal.org/node/29139
On Tuesday 05 December 2006 08:48, Jody Cleveland wrote:
[ s n i p ]
Also, I'm not seeing anywhere I can 'turn off' primary links for that section.
admin/settings/menu
I see it listed under blocks, but it's disabled. But, it still shows up. Is there something else I need to do?
After disabling it in the above area, you can enable it in blocks and treat it the same as the teens and kids menu block.