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 »
  • Set a home page or persuade show_menu2 to use full URL?
  • Print
Pages: [1]   Go Down

Author Topic: Set a home page or persuade show_menu2 to use full URL?  (Read 4878 times)

Offline snerpton

  • Posts: 14
Set a home page or persuade show_menu2 to use full URL?
« on: April 01, 2010, 04:05:52 PM »
Dear all,

I am using show_menu2 to create a horizontal navigational menu at the top of every page on a site. The trouble is, is that the designer wants the home page to appear last in the list. So for example my menu might look something like this:

[Page 1] [Page 2] [Page 3] ... [Home]

The menu functions fine and all the links work etc, but because 'Page 1' is listed first in my list of pages WB thinks this is my home page. I had a quick play with mod_rewrite to make all domain.com urls silently redirect to domain.com/pages/home.php, but I then discovered that the 'Page 1' link didn't work. It seems show_menu2 produced links in the following manner:

Page 1: domain.com/
Page 2: domain.com/pages/page_2.php
Page 3: domain.com/pages/page_3.php
home:  domain.com/pages/home.php

Note the lack of a page for Page 1.

Is there a way to set a page as a home page even though it isn't first in the list of pages, or to encourage show_menu to provide the link domain.com/pages/page_1.php for Page 1?

Any help or pointers in the right direction would be very much appreciated.

Kind regards,

Chris
Logged

apple

  • Guest
Re: Set a home page or persuade show_menu2 to use full URL?
« Reply #1 on: April 17, 2010, 09:39:32 AM »
Hi Chris, Have you found the answer yet? I thought it is a matter of naming your page. Instead of naming Home for home page, you name it Page 1, etc.
Logged

Offline sonar

  • Posts: 7
  • Gender: Male
Re: Set a home page or persuade show_menu2 to use full URL?
« Reply #2 on: June 24, 2012, 10:17:43 PM »
I know it is an old topic but I had the same problem.

This is my solution for it:
In /framework/class.frontend.php

Original:
Code: [Select]
// Check if link is same as first page link, and if so change to WB URL
            if($page['link'] == $this->default_link AND !INTRO_PAGE) {
                      $link = WB_URL;
            } else {
                      $link = $this->page_link($page['link']);
           }

Changed:
Code: [Select]
// Check if link is same as first page link, and if so change to WB URL
                      $link = $this->page_link($page['link']);

Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Set a home page or persuade show_menu2 to use full URL?
« Reply #3 on: June 25, 2012, 12:00:37 AM »
Yes, it is an old topic :)

The easy way is to use the settings pages and switch on the intro page functionality.
If you do not create an intropage, WB will still use the full url for the homepage.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Set a home page or persuade show_menu2 to use full URL?
 

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