Linking to existing articles directly from pages without using menus in Joomla! 3+

You are here:
< Back

Goal / Scope

This article will provide a step by step process for creating links to existing articles on a Joomla! website without displaying menus.

Background

Joomla! has no method for associating a link to an existing article unless a menu item has been created for that article.  There may be times when a user simply wants to link to another article on the Joomla! website without creating a menu for it on the page as well.  This is possible, but requires a little fancy footwork.

Methodology / Process Steps

If the Joomla! terms and concepts are unfamiliar, please review them here before continuing through this process.  A good understanding of the terms and concepts used in Joomla! will be important in understanding how to complete this process.

Now that there is a good base understanding of the components that make up the Joomla! website, an article can be prepared.

The example used here will publish an article that lists 10 things to remember about the New Trust Code.  To start, a category is created or verified with which the article can be associated with.  In this case, The New Trust Code category is used, but potentially a more general category could be used as well.  An example would simply be “Trust Codes” and then any articles pertaining to trust codes can be placed in this category and if necessary, the entire list of articles can be displayed on a single page to be browsed by visitors only looking for information on “Trust Codes”.  Once the category has been established and either created or selected, a new article can be created.

A couple of things to remember when creating an article:

  • A good plan is always recommended when working with Joomla!.  Determining categories and other layout designs is critical in a solid and good looking resulting website.  This concept cannot be stressed enough.
  • Once the save or save and close button has been pushed if the article status is set to be published, it will be available or visible to visitors.
  • Providing as much detail outside of the article as possible is best practice.  (I.E. adding tags, adding version comments, etc.)

Once all the planning of the site is complete, the categories have been defined and created on the site, and the article content is created, the next step is to associated the article with one of the categories available on the site.  Now that the article is complete and categorized, it should be saved and published.  This will allow the Joomla! site to display the article to visitors.  Note: without a link, it isn’t going to be possible to find the article.

There are two ways to provide links or access to articles, either via menu item or using a hidden menu item and placing a link to that menu item directly on an article page.  This example will show how to leverage a hidden menu and place a link to the content directly on the page.

To start, a “hidden” menu object must be created.  It can be named anything, but it is good practice to name it something that reminds you it is your “hidden” menu.  In this example, “hidden” will actually be the name of the menu.

Once the hidden menu has been created, an article or page can be associated to it by clicking “Menus”, then from this list, click the name of the menu you wish to add the article, in this case “hidden”.  Below is a screenshot of the menus list with a hidden menu entry created.

menus-menu-web

Figure 1 – The “Menus” menu and hidden menu object.

Once this menu configuration page opens, clicking the “New” button at the top will allow a new item to be created as shown below.

new-menu-item

Figure 2 – Creating a new menu item

The Menu item title will need to be supplied first.  This is the name of the item as it will appear on the menu.  Directly to the right of the “Menu Title” input box, is the “Alias” input box and by default it will automatically generate this based on the title.  This is simply the URL friendly version (or version that will be accepted in a web address) of the title.  A custom alias can be used, but it is recommended that this simply be auto generated from the title.  The first selection after naming the menu item will be “Menu Item Type”, which will define the type of menu item being created.  Again for this example, a single article will be used.

menu-item-settings

Figure 3 – Naming the menu item and selecting the menu item type

By clicking on the “Select” button behind the “Menu Item Type” input, a pop-up window with a list of different options will become available.  One of the options will be “Articles”, and when clicked will produce a number of other options specific to articles.  By selecting “Single Article”, the form will allow for configuration of a link to a single article.  The other options are not in the scope of this document.

set-menu-type

Figure 4 – The menu item type list.

An additional input will be added to the form named “Select Article” requesting the name of the article this menu item will link to.

select-menu-item-article

Figure 5 – The added “Select Article” option and populated “Link” input box.

Once the menu item type and article name has been selected, the target window and template type are really the only remaining options to configure.  The “Target Window” allows the link to be opened in either the current window / tab, a new window / tab, or a new window / tab with the current window / tab’s browsing history attached to it.  The “Template Type” allows different templates to be assigned.

Other options are available via the tabs across the top, but these options are out of the scope of this document.  Once, the settings are configured for the menu item, clicking “Save” will finish the setup of the menu item on the “hidden” menu.  This will generate the URL string required to place a link to the article anywhere on the site provided the scope of the hidden menu is site wide.

Selecting the “Link” input box and copying the contents will allow this link to be placed on any page of the Joomla! site.  Below is a review of the minimum options that should be configured for a link to work successfully using a “hidden” menu.

Finally, in order to use the URL created here in a page, edit the web content type, (i.e. article, module, etc.) and add the link using either the alias of the menu item or the link of the menu item.

adding links

Save and close the content type and always remember to test the new changes.

Known Issues / Troubleshooting

This section is for the issues that have well defined and tested solutions.

Problem: | Why am I getting a page cannot be found error?

Solution: | The URL used for the link is incorrect or pointing to something that doesn’t exist.  Verify the menu item on the hidden menu.

References

How to control modul display when linking to an article with no menu item

http://docs.joomla.org/How_to_control_module_display_when_linking_to_an_article_with_no_menu_item

Last Updated On October 24, 2017
Tags: