Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Menu for external link; Menu spacers
#1
I want to show in the menu bar a couple of menu items that link to external pages. They are in the same domain, but are separate applications: my blog and my photo gallery. Ideally they would be separated from the other menu items with a spacer of some sort so that they appear distinct and as a different grouping of menu items.

What I've done is great a dummy page and simply edited the <url> tag to use the external link like this: /blog/index.cgi , with a title tag of "Blog".

For the spacer, I've done the same thing and just deleted the contents of the title and the url tag (which has the side effect of returning the user to the home page if it is clicked).

Is that the best way to do this?

Many thanks,
Nick
Reply
#2
There is no really good way to put any external pages in the menu, so if changing the URL contents works for you go right ahead.

Adding a spacer that way is not recommended. As it will add an empty menu item, meaning an empty list item. That’s not best practise as non-visual browsers will think the list has (just an example) 9 items and might use this information, but in reality 2 of them are empty.

If you must have gaps, the best way to do it is by using CSS.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
I found a fairly easy way to add external links to the navigation through the admin panel. All I had to do is make 2 custom fields (I did it manually and then did it again with the custom field plugin), and then add a few lines to your (Zegnat) drop down menu plugin, and the client can easily add external links. Below is a screenshot and an example website where you can see several dropdowns using external links.
I would make this a plugin but It uses two other peoples plugins as well.

Please let me know if anyone would like the coding I used for this.

Screenshot Of Page Edit: http://profileyctest.com/fields-screenshot.jpg
Website Example (Test Website): http://profileyctest.com/


Zegnåt Wrote:There is no really good way to put any external pages in the menu, so if changing the URL contents works for you go right ahead.

Adding a spacer that way is not recommended. As it will add an empty menu item, meaning an empty list item. That’s not best practise as non-visual browsers will think the list has (just an example) 9 items and might use this information, but in reality 2 of them are empty.

If you must have gaps, the best way to do it is by using CSS.
Reply
#4
mikeh Wrote:I found a fairly easy way to add external links to the navigation through the admin panel. All I had to do is make 2 custom fields (I did it manually and then did it again with the custom field plugin), and then add a few lines to your (Zegnat) drop down menu plugin, and the client can easily add external links.

I used you suggestion to enhance the navigation of the I18N plugin. It now supports external links, just create a custom field link using the I18N Custom Fields plugin and use it in the page edit view.

See also here.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 1 Guest(s)