By swarna.p on
Hi,
I have some issue and i am very new to drupal and php as well.
The problem is i have a primary link as Service and support displayed horizontally.
This primary link has few secondary links and the first one is Testing service which also has some submenus.
I am trying to display this secondary link and its submenu vertically on left side.
Please help me on this i am attaching the screen shot as well for better understanding.
Let me know the code changes and files that need to be updated.
many thanks in advance!
Opps sorry i am unable to paste the screenshot here its somthing like
Primary links Market Customer Service& support
Secondary links
- Testing Service
- Substation Service
- Instrumentation service
This how it looks like!
Comments
Any one there who can help me
Any one there who can help me on it?
This is regarding Tertiary
This is regarding Tertiary links.........does any one has any idea?
i have followed the particular link http://drupal.org/node/333849#comment-1376314
But still i am unable to display the submenus
seems that i am going some where wrong in page.tpl.php
i have the following code in page.tpl
if(is_array($tertiary_links)):foreach ($tertiary_links as $link):endif;>
<?
$href = $link['href'] == "" ? base_path() : base_path() . drupal_get_path_alias($link['href']);
print "" . $link['title'] . "";
?>
endforeach;endif;http://drupal.org/project/men
http://drupal.org/project/menu_block
yep, check out the menu_block
yep, check out the menu_block module. also have a look at node 334624 for some recent discussion and other options (this is a common and age-old question, afaict!).
As per the proj requirement i
As per the proj requirement i have to do this php coding itself
But the problem is i am java background
so one thing i am stuck at is
i have the following code in my template.php
function menu_tertiary_links() {
$primary = variable_get('menu_primary_menu','0' );
$secondary = variable_get('menu_secondary_menu','0');
if (!$primary || !$secondary) { //primary and/or secondary links disabled - ergo no tertiary links should be available
return NULL;
}
if ($secondary != $primary) //secondary menu is different from primary - return children of explicitly defined secondary
return menu_primary_links(2, $secondary);
else //all based on primary - return the third level accordingly
return menu_primary_links(3, $primary);
}
/**
* Override or insert PHPTemplate variables into the templates.... modified
*/
function _phptemplate_variables($hook, $vars) {
$vars['tertiary_links'] = menu_tertiary_links();
}
and in page.tpl.php
print "Testing".$tertiary_links;but the problem here is $tertiary_links; prints nothing .......
where am i going wrong here
Please help i am badly stuck here!