views:

1896

answers:

3

Say you want to create a manual link to an article in Joomla! (that is, an "External Link" type menu item or a link within an article). You must start the URL with "index.php?...", not an absolute URL, or it will break compatibility with Search Engine Friendly URLs. With SEF off, you can just go to the front-end of your site and copy the url from the menu item you want to link to. With SEF on, you only see the routed version of the URL, which of course would break if SEF were turned off.

Joomla integrated editors (I'm using JoomlaFCK) usually offer a "Joomla! Link" button to let you find and link to a particular article. However, they don't highlight a menu item or use that menu item's parameters. If you want the link to use a particular menu item (and you probably do) you have to manually look up the menu item's ID and add "&Itemid=XX" at the end of the URL. To add insult here, "Itemid", with its strange initial capital, is case sensitive. Even the URL in the source menu item's detail page does not include the menu item ID, only the article id.

I have clients who really don't get this, and why should they? How can I tell a tech un-savvy client to find the right URL to link to a menu item? Are there any extensions that help with this?

Edit: I just wanted to share that I didn't know about the Alias menu item type when I wrote this. You should use that instead of "External Link" if you want your new menu item to highlight a certain other menu item. It's useful for making custom breadcrumb or sidebar menu hierarchies. The problem still holds for links within articles, though.

+1  A: 

I gave my client a little manual on how to make links including a screenshot of the menu(s). Then it becomes quite easy! I wouldn't know of any extensions for that, then again I don't know all joomla extensions ;)

tharkun
A: 

Firstly, I want to thank you for helping me with a problem - after reading your post I just realized the SEF wasn't working perfectly on my site. I was missing the Itemid parameter! (Without it, Joomla creates links like /component/<comp-name>/42 or /<current-menu-alias>/42).

To answer your question, if an article already has an SEF URL, I'd suggest telling them to simply copy-paste the URL explicitly. It's the easiest for clients (and I find doing that much easier myself). Sure, it will break links if SEF is turned off, but why is that an issue? Just don't turn it off! ;)

If clients find it easy to grab those ID numbers, it might be an idea to create a custom plugin that replaces {article:42:5} with a URL like index.php?option=com_content&article=42&Itemid=5. You can create a plugin with just an XML manifest file and raw PHP code, that's what I often do...

DisgruntledGoat
A: 

I found an extension that useful for this: Linkr. I no longer have trouble explaining how to create menu item links within articles. Combined with the Alias menu item type, this covers all of my problems.

Jerph