Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 09:21:31 AM

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.
155535 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Alternative to Menu_Link module - Yes, Page-Copier  (Read 653 times)
PurpleEdge

Offline Offline

Posts: 232



WWW
« on: May 18, 2010, 08:14:30 AM »

Is there an alternative to the menu_link module?

I am finding that menu_link is messing up my "pretty" URLs and it doesn't respect the menu path when creating a site map.

Would it be practical for a MenuLink module to simply replace the index.php page that is created for the new menu item with a new index.php that points to the page that the menu is supposed to load?

« Last Edit: May 19, 2010, 07:38:51 AM by PurpleEdge » Logged
chio
WebsiteBaker Org e.V.

Offline Offline

Posts: 2264


« Reply #1 on: May 18, 2010, 08:59:47 AM »

Jepp,
The best way would be to replace the links at the end of the index.php:
Find out the menulinks
FInd out their real link
str_replace them, before the final output of the page.

But this would be a quite slow method...

Logged

*weg*
PurpleEdge

Offline Offline

Posts: 232



WWW
« Reply #2 on: May 18, 2010, 09:19:36 AM »

I was thinking of doing this when the menulink page is created, so it only gets done once.
Logged
chio
WebsiteBaker Org e.V.

Offline Offline

Posts: 2264


« Reply #3 on: May 18, 2010, 10:17:31 AM »

Thats not that easy, because WB saves a URL like "/folder/file"
Without Extension, without WB_URL and PAGES_DIRECTORY

So it wont work to change only the "link" - you also have to change all modules and snippets, which use the link - first of all "showmenu" and "showmenu2". And some more.
Logged

*weg*
PurpleEdge

Offline Offline

Posts: 232



WWW
« Reply #4 on: May 18, 2010, 01:50:38 PM »

I'm not talking about changing the link, I'm suggestion changing the contents of index.php so instead of...

<?php
$page_id = 28;  // points to menu_link page which redirects to page_id = 15

.. generate..

<?php
$page_id = 15; //load page_id 15 directly

If I edit index.php for a menu_link page manually, it seems to work correctly. ?!


Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2296



WWW
« Reply #5 on: May 18, 2010, 02:17:09 PM »

Looks to me you are looking for the functionality of the Section-Picker

Ruud
Logged

Professional WebsiteBaker Solutions
PurpleEdge

Offline Offline

Posts: 232



WWW
« Reply #6 on: May 19, 2010, 07:30:37 AM »

Thanks Ruud,

You pointed me in the right direction Page-Copier does exactly what I want, but in a better fashion!
« Last Edit: May 19, 2010, 07:35:23 AM by PurpleEdge » Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #7 on: May 19, 2010, 07:58:39 AM »

you mean editing the generated <page_name.php> and change the page_id there?

Or do you mean the rotts index.php

John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
PurpleEdge

Offline Offline

Posts: 232



WWW
« Reply #8 on: May 19, 2010, 08:16:48 AM »

What I was looking for, functionally, was ...

  • the ability to create a new menu link to an existing page
  • retain my pretty-urls
  • have the url display the new menu path
  • have the breadcrumb trail show the new menu path to the page

This is exactly what page-copier provides.

So, now I can have a menu system which lists, for example, businesses by business type...

business-advertising/trades-people/electrical-services/toms-electrical-services/

...and business by suburb...

suburb-index/sydney/electrical-services/toms-electrical-services

...and have the menus point to the same page.

If you are familiar with Drupal, it is similar to their taxonomy.

My suggestion of changing the page-id in index.php doesn't provide the same features as page-copier.

« Last Edit: May 19, 2010, 08:18:58 AM by PurpleEdge » Logged
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!