WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Template with top and side menu but independant each other
  • Print
Pages: [1]   Go Down

Author Topic: Template with top and side menu but independant each other  (Read 16518 times)

Offline midiweb

  • Posts: 181
Template with top and side menu but independant each other
« on: March 02, 2008, 10:37:49 PM »
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.
« Last Edit: March 09, 2008, 05:04:10 PM by midiweb »
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: template with top and side menu but independant each other
« Reply #1 on: March 03, 2008, 12:13:38 AM »
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
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline midiweb

  • Posts: 181
Re: template with top and side menu but independant each other
« Reply #2 on: March 07, 2008, 11:08:11 PM »
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: [Select]
<?php show_menu(1); ?> and
Code: [Select]
<?php show_menu(2); ?>1. index.php
Code: [Select]

<?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(&#39;WB_URL&#39;)) {
    
header(&#39;Location: ../index.php&#39;);
    
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(&#39;DEFAULT_CHARSET&#39;)) { echo DEFAULT_CHARSET; } else { echo &#39;utf-8&#39;; }?>" />
<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(&#39;register_frontend_modfiles&#39;)) {
  
register_frontend_modfiles(&#39;css&#39;);
  
register_frontend_modfiles(&#39;js&#39;);
} ?>

<?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(&#39;&#39;,&#39;[WEBSITE_TITLE]&#39;); ?>
    </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[&#39;SEARCH&#39;]; ?>" 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>

and
2.info.php
Code: [Select]
<?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 = &#39;simple&#39;;
$template_name = &#39;Simple&#39;;
$template_version = &#39;2.6&#39;;
$template_platform = &#39;2.6.x&#39;;
$template_author = &#39;Ryan Djurovich&#39;;
$template_license = &#39;GNU General Public License&#39;;
$template_description = &#39;This template is designed for developers to learn how to make templates easily. Please note this template only supports 2 page levels.&#39;;
$menu[1]    = &#39;Main navigation&#39;;
$menu[2]    = &#39;Top navigation&#39;;
?>



Where have i to change the code, in CSS or in .php?

Thanks for support
« Last Edit: March 07, 2008, 11:35:54 PM by midiweb »
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: template with top and side menu but independant each other
« Reply #3 on: March 07, 2008, 11:30:55 PM »
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
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline midiweb

  • Posts: 181
Re: template with top and side menu but independant each other
« Reply #4 on: March 07, 2008, 11:40:36 PM »
I think first here in the css:
Code: [Select]
.footer {
    background-color: #DDDDDD;
    text-align: right;
    font-size: 10px;
    height: 10px;
}
because when I replace
Code: [Select]
text-align: center;
with
Code: [Select]
text-align: right;
my items are displayed right and not in the middle.


I need a little thing to change the direction, so

Code: [Select]
Home-Contact-about us,... and not

Code: [Select]
Home
Contact
About us
....


But why is it called "footer" when the items are at the head, why not "Header"
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: template with top and side menu but independant each other
« Reply #5 on: March 08, 2008, 05:53:40 PM »
Quote from: midiweb on March 07, 2008, 11:40:36 PM
But why is it called "footer" when the items are at the head, why not "Header"

I am pretty sure the .footer part was originally meant for the footer. Not for the menu's.
You are using the "simple" template. That one has no horizontal menu in it's CSS.

Try to install (and activate) the template I suggested, and modify that one to start with.

Add in the info.php these two lines:
Code: [Select]
$menu[1]    = 'Main navigation';
$menu[2]    = 'Top navigation';
(don't forget to set the "multiple menus" in the advanced settings page)

Modify in index.php line 55 from
Code: [Select]
<?php show_menu2(1, SM2_ROOT+1, SM2_CURR+1); ?>into
Code: [Select]
<?php show_menu2(2,0,1); ?>And you might see some result you like.

Ruud






 
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline midiweb

  • Posts: 181
Re: template with top and side menu but independant each other
« Reply #6 on: March 09, 2008, 05:03:18 PM »
Thanks. I made the changes but I got the error message:

Code: [Select]
Fatal error: Call to undefined function show_menu2() in /Applications/xampp/xamppfiles/htdocs/wb/templates/industry1/index.php on line 55
Logged

Offline marathoner

  • Posts: 495
Re: Template with top and side menu but independant each other
« Reply #7 on: March 09, 2008, 06:11:07 PM »
Do you have show_menu2 installed? If not, install it from the addon library.
Logged

Offline midiweb

  • Posts: 181
Re: Template with top and side menu but independant each other
« Reply #8 on: March 10, 2008, 01:57:15 PM »
I installed the templates "industry1".
The index.php shows:
       
Code: [Select]
<?php show_menu(1,0,1,true,&#39;<li><span[class]>[a][menu_title] [/a]</span>&#39;,&#39;</li>&#39;,&#39;<ul id="nav">&#39;); ?>and

   
Code: [Select]
<?php show_menu2(2,0,1); ?>
I don't find the module  show_menu2 in  the library.

The page ist not entirely displayed but only the half!

When I change    
Code: [Select]
<?php show_menu2(2,0,1); ?> in    
Code: [Select]
<?php show_menu(2,0,1); ?>, the whole page is dsplayed but the top menu is highlighted with grey background.

And the error message is not there yet. Something is bugged is this template or in WebsiteBaker.

 :x
Logged

doc

  • Guest
Re: Template with top and side menu but independant each other
« Reply #9 on: March 10, 2008, 01:58:56 PM »
hello,

install the code snippet show_menu2 from the WB Addons repository. Then try again.

Regards Christian
Logged

Offline midiweb

  • Posts: 181
Re: Template with top and side menu but independant each other
« Reply #10 on: March 10, 2008, 02:09:42 PM »
sorry, I was lazy, I've just found it in the repository. Thansk again. I try it immediately ands send feed back :lol:
Logged

Offline midiweb

  • Posts: 181
Re: Template with top and side menu but independant each other
« Reply #11 on: March 10, 2008, 02:25:01 PM »
Great! it works but in the backend options Main Navigation becomes Top Navigation (or what??
And I have to set up  the same langages for each menu items like the backend is otherwise I don't see the items different from the installed language. Curious!!
Logged

Offline midiweb

  • Posts: 181
Re: Template with top and side menu but independant each other
« Reply #12 on: March 10, 2008, 02:49:47 PM »
I cannot find how can I add an item in "Latest News" and display it.
It would be very pratical to have the same window as the other items,...
Logged

Offline marathoner

  • Posts: 495
Re: Template with top and side menu but independant each other
« Reply #13 on: March 12, 2008, 01:31:43 AM »
Not exactly sure what your question is. If you want to put put some news on a certain page (such as your home page) you can use the NewsAnywhere snippet. You can customize the output to meet your formating needs.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Template with top and side menu but independant each other
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2