Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
External Links in Menu
#1
I may be wrong, but it looks like you can only link internal pages by default. Adding a menu item that links to an external source seems to be impossible without using a plug in or exporting your site to static html and editing it manually.

I think the ability to link to external sites should really be a core feature of the Menu function..
Reply
#2
It is possible to do without a plugin. What I do is create a redirect.php template which has the following code in it:
Code:
<?php if(!defined('IN_GS')){ die('You cannot load this page directly.'); }

header("HTTP/1.1 301 Moved Permanently");
header("Location: " . get_page_meta_desc(false));

exit();
Then I create a page that uses this template, add it to menu and insert the external (or base relative path) in the meta description field. Although hackish, it works quite well and could possibly be a core way of handling external links in menus.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#3
I roughed up the start of a plugin to hook the menu here: http://get-simple.info/forum/post/8850/#p8850

This can be extended to add new external links.

The multilevel navigation plugin can also do this (see half way down): http://mvlcek.bplaced.net/get-simple/mul...avigation/

-Rob A>
Reply
#4
I do something similar. The biggest difference is tha I use the meta keywords field instead of the meta description field.

For those who requiring step-by-step instructions...

1. Copy and paste the following into a new file. Call it "redirect.php".

Code:
<?php if(!defined('IN_GS')){ die('You cannot load this page directly.'); }
/****************************************************
*
* @File: redirect.php
* @Package: GetSimple
* @Action: Your Theme
*
*****************************************************/
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . get_page_meta_keywords(false));
exit();
?>

2. Place the file in the /theme/[YourTheme]/ folder on your website where [YourTheme] is the name of the theme you are using on your site.

3. Log into the admin side of your website and edit the page you want to redirect.

4. In the editor, click on the Page Options button at the top of the editor.

5. You will need to make two changes:
4. Click the Save Updates button at the bottom of the page.

Now when anyone tries to view the page you just edited will automatically be redirected to the address you entered above.

Why do this?
  • SEO - This tells search engines where to find content that used to be at a particular address on your website, all this without having a negative impact on the ranking of your web page.
  • Bookmarks/Favourites - If people have a bookmark to that particular page, they will be able to find your updated page.
  • Links - Whether there might links pointing to the page on your website or there are links are another website, never to leave people with a dead link. Even if you didn't put a link on other websites, others may have.
  • Removed Content - If you are removing content on your website for any reason (information was obsolete, no longer irrelevant or just undesireable), create a single page with a message to that effect and then redirect all your removed content pages to that single page. That way, if you ever decide to modify the message, you'll only have to do it in one place.
  • External Link - Useful if you want to have a menu item that links directly to a file or to a page on a different website.
Reply
#5
I would like this feature too. Maybe add something to Menu Manager for this functionality?
I achieve this currently by doing as follows:
1. Enable Fancy URLs
2. Make a folder same as slug
3. Make an index.php with a PHP redirect to the website.
(see http://php.about.com/od/learnphp/ht/phpredirection.htm )

This accomplishes it!
Reply
#6
shovenose Wrote:I achieve this currently by doing as follows: Enable Fancy URLs. Make a folder same as slug. Make an index.php with a PHP redirect to the website. (see about.com ) This accomplishes it!

The way I do it from within GetSimple (see above) is more easier to manage.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#7
True.
Reply




Users browsing this thread: 1 Guest(s)