Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:29:01 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155550 Posts in 21714 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Set which page is the homepage  (Read 590 times)
erratic
Guest
« on: August 02, 2011, 07:29:29 PM »

Hello, my client is using WebsiteBaker and I've never used it before, although I've made many websites I've never done php properly before. She has a sidebar to the left and it says 'home' at the top, I made this hidden and the 'home' text went but the homepage changed to the next link down.

I took a look at the index.php file (in public_html) and there is basically nothing there, just a page full of lines. I do know that the file being read is home.php but if this wasn't php I could change it all in a heartbeat  embarassed

I found the index.php that is evidentally contains the homepage code, it was under the templates folder!The home.php is in a /content folder

Please can you direct me as to which file I have to change in php to set the page that shows when home link is hidden, thanks.
« Last Edit: August 02, 2011, 07:53:25 PM by erratic » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #1 on: August 03, 2011, 06:07:21 AM »

Hello,

this is very simple explained. Look at your site structure in the backend. The first page on the top is always the "homepage", no matter how this page is named.

Please don't change anything in the index.php files you found and please also dont change anything on files in the /content folder. You only need to make changes in the backend of WB, WB then generates all needed files.

Matthias
Logged
erratic
Guest
« Reply #2 on: August 03, 2011, 11:10:50 AM »

Hello,

this is very simple explained. Look at your site structure in the backend. The first page on the top is always the "homepage", no matter how this page is named.

Please don't change anything in the index.php files you found and please also dont change anything on files in the /content folder. You only need to make changes in the backend of WB, WB then generates all needed files.

Matthias

Hi yes I already know that, that is my problem! I want that top page to remain the home page, but be hidden on the menu so it can't be clicked. As soon as I set it to hidden, the homepage changes to a different page, even though the hidden page is still at the top (eek), I've tried setting to none and that didn't work either
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #3 on: August 03, 2011, 11:40:27 AM »

Hello,

so you only don't want this Page in the menu. This can be resolved by using multiple menues. Basically you have to do the following steps:

1.) Activate in "Settings" "Advanced options" "Multiple Menues"
2.) Define to the info.php of your template Menues (f.e. "MainMenue" and "NoMenue")
3.) Change in the settings of the first page the Menue to f.e. "NoMenue" and let all other Pages on "MainMenue"

More infos you got here: http://www.websitebaker2.org/en/help/designer-guide/multiple-menus.php?lang=EN

Matthias
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1253


« Reply #4 on: August 03, 2011, 11:42:20 AM »

it's not a trick .. it's logic only..   wink

use this pagetree (normal, visible sites only):

home
--- page 1
--- --- subpage 1-1
--- --- subpage 1-2
--- page 2
--- --- subpage 2-1
--- --- subpage 2-2

now create your menu from level 1 and up ( SM2_ROOT+1 )

on startup (http://mydoma.in/) you will see 'home' but home never will be visible in your menu

thats the whoole trick...   hierarchical logic   wink

think easy... and you will find a easy solution..
« Last Edit: August 03, 2011, 11:44:49 AM by DarkViper » Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #5 on: August 03, 2011, 11:47:28 AM »

Hello,

what DarkViper describes is the second option you have. Basiacally change your Pagetree and start the menu from second level.

So you have the choice between both options.

Matthias
Logged
erratic
Guest
« Reply #6 on: August 03, 2011, 11:52:21 AM »

Hello,

what DarkViper describes is the second option you have. Basiacally change your Pagetree and start the menu from second level.

So you have the choice between both options.

Matthias

Hmm yeah, I created a structure where everything went under the homepage as described (apart from 2 deleted pages that can be restored) but I have changed no code just set that in the CMS as I thought that would be the cure, but the 'home' link was still there.

So now I have to go into templates info.php and make the menu start at the next page down yes? I'll take a look at the help page to see if I can pull a code out that will make that happen (I don't know php.)

Thanks
Logged
erratic
Guest
« Reply #7 on: August 03, 2011, 12:34:54 PM »

Hello,

so you only don't want this Page in the menu. This can be resolved by using multiple menues. Basically you have to do the following steps:

1.) Activate in "Settings" "Advanced options" "Multiple Menues"
2.) Define to the info.php of your template Menues (f.e. "MainMenue" and "NoMenue")
3.) Change in the settings of the first page the Menue to f.e. "NoMenue" and let all other Pages on "MainMenue"

More infos you got here: http://www.websitebaker2.org/en/help/designer-guide/multiple-menus.php?lang=EN

Matthias

Hi again,

I've activated multiple menus and can now see it is activated as it lists "menu" as an option when I goto a page settings.

I tried to add various code to info.php and kept getting syntax errors when I went to change the page settings so I've removed it.

But I see in the documentation it mentions that I have to input the show menu codes to my index.php

I want to be able to set which pages show on the menu and which to not show on the menu like you describe, how can I go about this? The documentation doesn't seem to mention this, again please keep it understandable if possible. (DO I need a show menu module before the show menu codes work? I would think not as none of you mentioned it but I thought I'd ask..)

Please please, try and explain in detail if possible so I can understand easily
« Last Edit: August 03, 2011, 12:43:26 PM by erratic » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #8 on: August 03, 2011, 03:00:17 PM »

Hello,

please add to the info.php of your template:

Code:
// definitions for multiple menues (required if more than one menu is used)
$menu[1]    = 'MainMenue';
$menu[2]    = 'NoMenue';

before the closing ?>

And follow the instructions above.

The Multiple Menues feature ist thought for to have different Menues (f.e. at Top and on a side Menue or whatever). But when you add to a menue-point a menue and didn't call this in the index.php this Menue-point didn't appear on your Page. This is a little trick to hide Pages from Menu.

Matthias
Logged
erratic
Guest
« Reply #9 on: August 04, 2011, 12:58:03 PM »

Hello,

please add to the info.php of your template:

Code:
// definitions for multiple menues (required if more than one menu is used)
$menu[1]    = 'MainMenue';
$menu[2]    = 'NoMenue';

before the closing ?>

And follow the instructions above.

The Multiple Menues feature ist thought for to have different Menues (f.e. at Top and on a side Menue or whatever). But when you add to a menue-point a menue and didn't call this in the index.php this Menue-point didn't appear on your Page. This is a little trick to hide Pages from Menu.

Matthias

Thank you, you are a hero and that was very easy to do and it has worked perfect. Nice simple trick!
Logged
mjefferson96

Offline Offline

Posts: 12



WWW
« Reply #10 on: September 30, 2011, 02:37:44 AM »

Excellent you guys! I was looking for a way to set a hidden page as the home page too. This worked like a charm, and no need for hidden pages! Thanks a bunch, i owe you one!!!
Logged

Fix reason firmly in her seat, and call to her tribunal every fact, every opinion. Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason, than that of blindfolded fear.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!