WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Template with top and side menu but independant each other
midiweb:
Hello, I'm looking for a template with top menu and side menu but not each other dependant, a very simple template, I don't find it.
For instance, I 'd have at the top: HOME-PRODUCTS-CONTACT-ABOUT US
On the left side: CLIENTS-MANAGEMENT-CATEGORIES,...
When I click on PRODUCCTS the corresponding content is diplayed in the middle of the page but the items in the menus stay unchanged both left and at the top.
Ruud:
You need to create multiple menu's.
There is a good explanation here: http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/multiple-menus.php
Cheers
midiweb:
hello, thanks. I managed to build in the default template the top menu but the items are displayed vertical and not inline. How can I change this?
here my code and the
--- Code: ---<?php show_menu(1); ?>
--- End code ---
and
--- Code: ---<?php show_menu(2); ?>
--- End code ---
1. index.php
--- Code: ---
<?php
// $Id: index.php 691 2008-02-10 13:17:15Z doc $
/*
WebsiteBaker Project <http://www.WebsiteBaker.org/>
Copyright (C) 2004-2008, Ryan Djurovich
WebsiteBaker is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
WebsiteBaker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with WebsiteBaker; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
if(!defined('WB_URL')) {
header('Location: ../index.php');
exit(0);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php page_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<link href="<?php echo TEMPLATE_DIR; ?>/screen.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo TEMPLATE_DIR; ?>/print.css" rel="stylesheet" type="text/css" media="print" />
<?php
// this allows to include the optional module files (frontend.css, frontend.js) into the head section
if(function_exists('register_frontend_modfiles')) {
register_frontend_modfiles('css');
register_frontend_modfiles('js');
} ?>
<?php
// this allows to add custom information to the head section of your template (WB-->Settings-->Website Header)
echo WEBSITE_HEADER;
?>
</head>
<body>
<table cellpadding="5" cellspacing="0" border="0" width="750" align="center">
<tr>
<td colspan="2" class="header">
<?php page_title('','[WEBSITE_TITLE]'); ?>
</td>
</tr>
<tr>
<td colspan="2" class="footer">
[b]<?php show_menu(2); ?>[/b]
</td>
</tr>
<tr>
<td class="menu">
<?php if(SHOW_MENU) { /* Only shown menu if we need to */ ?>
<br />
<?php show_menu(1); ?>
<?php } ?>
<?php if(SHOW_SEARCH) { /* Only show search box if search is enabled */ ?>
<br />
Search: <br />
<form name="search" action="<?php echo WB_URL; ?>/search/index.php" method="get">
<input type="text" name="string" style="width: 100%;" />
<input type="submit" name="submit" value="<?php echo $TEXT['SEARCH']; ?>" style="width: 100%;" />
</form>
<?php } ?>
<br />
<a href="http://www.WebsiteBaker.org" target="_blank">Powered by <br /> WebsiteBaker</a>
</td>
<td class="content">
<?php page_content(); ?>
</td>
</tr>
<tr>
<td colspan="2" class="footer">
<?php page_footer(); ?>
</td>
</tr>
</table>
</body>
</html>
--- End code ---
and
2.info.php
--- Code: ---<?php
// $Id: info.php 519 2007-12-23 14:37:02Z Ruebenwurzel $
/*
WebsiteBaker Project <http://www.WebsiteBaker.org/>
Copyright (C) 2004-2008, Ryan Djurovich
WebsiteBaker is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
WebsiteBaker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with WebsiteBaker; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
$template_directory = 'simple';
$template_name = 'Simple';
$template_version = '2.6';
$template_platform = '2.6.x';
$template_author = 'Ryan Djurovich';
$template_license = 'GNU General Public License';
$template_description = 'This template is designed for developers to learn how to make templates easily. Please note this template only supports 2 page levels.';
$menu[1] = 'Main navigation';
$menu[2] = 'Top navigation';
?>
--- End code ---
Where have i to change the code, in CSS or in .php?
Thanks for support
Ruud:
You have to use both.
Mainly the CSS will be responsible for creating the menu horizontal or vertical, but you will need more parameters in the php code also.
I would advise you to install some templates from the addons and look in the CSS/PHP how things are done.
This one (http://addons.WebsiteBaker.org/pages/lorem-ipsum.php?template=industry1) is a nice one to start with.
Simple and uses both menu's. (root menu horizontal, sub menu's vertical)
Good luck
midiweb:
I think first here in the css:
--- Code: ---.footer {
background-color: #DDDDDD;
text-align: right;
font-size: 10px;
height: 10px;
}
--- End code ---
because when I replace
--- Code: ---text-align: center;
--- End code ---
with
--- Code: ---text-align: right;
--- End code ---
my items are displayed right and not in the middle.
I need a little thing to change the direction, so
--- Code: ---Home-Contact-about us,
--- End code ---
... and not
--- Code: ---Home
Contact
About us
--- End code ---
....
But why is it called "footer" when the items are at the head, why not "Header"
Navigation
[0] Message Index
[#] Next page
Go to full version