Author Topic: Content page without menu item  (Read 3132 times)

lotht

  • Newbie
  • *
  • Posts: 6
  • Karma: 4
    • View Profile
Content page without menu item
« on: December 27, 2008, 04:18:51 AM »
Hi, would it somehow be possible to create content pages without adding them to the site menu?
I thought I could insert links to these pages into the text of another content page, it may be similar to a submenu but not exactly the same. The lack of this stopped me for a while...
Btw, happy new year to you all!

HandsomeWeb

  • SOS Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 85
  • Karma: 2
    • View Profile
    • SOS Webpages
Re: Content page without menu item
« Reply #1 on: December 28, 2008, 08:46:10 AM »
Not within the context of the application.

I had a similar situation and did the following.

I cut and pasted the source code from a page and saved it as an HTML page.  I then cut out the menu code and changed the style in the header to remove the left margin of the main content section.  How to do this would vary with every template you are using.
Chris
http://www.soswebpages.com
http://www.handsomeweb.com
http://www.handsomewebservices.com

lotht

  • Newbie
  • *
  • Posts: 6
  • Karma: 4
    • View Profile
Re: Content page without menu item
« Reply #2 on: December 28, 2008, 11:39:40 AM »
Thanks. Will try soon.

lotht

  • Newbie
  • *
  • Posts: 6
  • Karma: 4
    • View Profile
Re: Content page without menu item
« Reply #3 on: December 28, 2008, 03:13:16 PM »
Oops, I'm afraid of misunderstanding...
I didn't want to have a page where the menu on the left is not visible.
What I wanted to achieve was to have a full page with menu visible but this page should not be a menu item itself.
Do you have a guess how to do this?
Same way? Create the page, save as html and upload?
Isn't there a magic word to insert as Menu Title on the Add a Page screen to have the menu item invisible?
Thanx.

HandsomeWeb

  • SOS Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 85
  • Karma: 2
    • View Profile
    • SOS Webpages
Re: Content page without menu item
« Reply #4 on: December 29, 2008, 04:02:29 PM »
There is no magic word, but I'll consider that for a future version.  Interesting idea.

I think the easiest way is to save the HTML output source for the page you want and save it as an HTML page.  Then remove the page from within the system.

The PHP Freak Solution ;)
I am currently building a site with the system that will have the main links for the site across the top as part of a custom template.  The template file will call a custom menu.php file that is within the template folder instead of the one in the includes folder.  Like this:
Code: [Select]
//-----------------------------------------------------------------
// MAIN MENU
//-----------------------------------------------------------------
//This section builds the main menu
//Each menu item will be defined by the text in the variable below
//This template will use a custom menu file
$menu_item_divider = "</li><li>";
$pathFix = dirname(__FILE__);
include("templates/$templates_folder/menu.php"); //Works all the time...
//-----------------------------------------------------------------

I will have it not save the menu items I want to skip.  I did this by changing the SQL query to the following:
Code: [Select]
$query = "SELECT * FROM " . $dbprefix . "hw_pages WHERE pages_parent_id=0 AND pages_id > 8 ORDER BY pages_order, pages_menu_title";I am skipping every page above pages_id 8.  I could have just as well said AND 'pages_id<>4' to skip page 4.

By keeping the menu.php file in my custom template folder, it won't be overwritten on any future upgrade.

Chris
http://www.soswebpages.com
http://www.handsomeweb.com
http://www.handsomewebservices.com

lotht

  • Newbie
  • *
  • Posts: 6
  • Karma: 4
    • View Profile
Re: Content page without menu item
« Reply #5 on: January 02, 2009, 01:51:15 AM »
Hi, I chose a different and maybe flexible solution.
Also in menu.php I added a condition to display the menu item. This checks if the name of the menu item starts with the # character. I does so, the item won't be displayed. In editing mode nothing changed. See below:


while ($i<$num){
   $menu_pages_menu_title=mysql_result($result,$i,"pages_menu_title");
   $menu_pages_uri=mysql_result($result,$i,"pages_uri");
   $menu_pages_id=mysql_result($result,$i,"pages_id");
        if ($menu_pages_menu_title[0] <> "#") {
      if ($i<>0) echo $menu_item_divider;
      echo "<a class='menu' href='http://" . $site_uri .  "/index.php?pages_id=" . $menu_pages_id . "&amp;t=" . $menu_pages_uri . "'>" . $menu_pages_menu_title . "</a>";
       }
   $i++;
   }

HandsomeWeb

  • SOS Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 85
  • Karma: 2
    • View Profile
    • SOS Webpages
Re: Content page without menu item
« Reply #6 on: June 18, 2010, 08:32:02 AM »
A feature to hide a page or an external link was added in version 1.1.9.
Chris
http://www.soswebpages.com
http://www.handsomeweb.com
http://www.handsomewebservices.com

baliromavilas

  • Newbie
  • *
  • Posts: 1
  • Karma: 1
    • View Profile
    • Bali villas
Re: Content page without menu item
« Reply #7 on: August 27, 2011, 07:14:36 AM »
Thanks. Will try soon.