- Using the Article Managers
- Choosing an Editor
- Adding Articles
- Doing More with Articles
- Creating Article Menu Items
- Putting It All Together
Doing More with Articles
The term article is Joomla’s way of classifying any type of web content displayed in the main body of your web pages, including images, video, Flash files, photo galleries, tables, links, and even modules.
In this section, you’ll add several types of elements as article content.
To add links to an article:
- Log in to the back end.
- Choose Content > Article Manager.
- Select the checkbox next to the article My New Article, and then on the toolbar, click Edit.
The sample data has a complex article titled Site Map that uses an advanced way of linking to other content by loading a module into the article. In this example, you are going to create a direct link to the Site Map article.
You can place links to other content into an article by using any of the following methods:
- Enter a link by typing it in.
- Link directly to an article title using the Article button in the editor.
- Load a module into the article.
- In the Article Text editor, type View the Site Map article, click here.
- Highlight an entire line of text, and click the Link button in the editor
.
The TinyMCE editor does not display a list of all your articles. When creating a link from highlighted text, you must know the full path to the article. All Joomla editors have advanced features to create dynamic links and interaction such as adding JavaScript functions and pop-up windows
.
Other third-party editors have plug-ins that allow you select another category, article, and so on.
- Enter the full URL into the Link URL field linking to the Site Map article.
- Click Insert.
When you return to the article editor, the text you selected is now a link to the Site Map article
.
- On the toolbar, click Save.
- Click View Site.
If you followed the previous steps in this chapter, you will still see a link on the home page to My New Article.
- Click My New Article
.
- In this article, click the link “View the Site Map article, click here.”
The Site Map article opens.
To add a module to an article:
- Log in to the back end.
- Choose Content > Article Manager.
- From the Select Category drop-down list, choose Sample Data–Articles.
The only article assigned to this category is Site Map
.
You can add links to other articles or even add an entire module in an article that links to other content.
- Click the title Site Map to open the article editor screen.
In the Site Map article text editor, you’ll see the following:
{loadposition sitemapload}
.
This is code that Joomla uses to place a module into a position that you create so the module will load inside the article. This position is not used by or defined by your template. You create the name and then use the Module Manager to create the position.
- On the toolbar, click Close.
- Choose Extensions > Module Manager.
- From the Select Position drop-down list, choose sitemapload
.
The only module using this position is a menu module titled Site Map.
- Click the Site Map module title to open it for editing.
Under Basic Options, the Select Menu drop-down menu is set to Main Menu because this module is a menu module.
Notice the Start and End Levels for the menu items.
In the Position field, the sitemapload position is entered. You can create any position name you want and then use the loadposition function to assign a position inside an article
.
The loadposition function creates a position in the article, and sitemapload is the name of that position. Joomla recognizes the position, finds the module using that position, and loads it.
- On the toolbar, click Close.
- Click View Site.
- From the This Site menu, choose Site Map.
The three links—Articles, Weblinks, and Contacts—are actually menu items assigned to the Main Menu Module
.
Because the Site Map menu module is set to display only level 2 to 3 submenus, only three links are listed.
This shows how incredibly flexible Joomla can be when creating content and dynamic navigation. Any module can be loaded into article content.
To add an image to an article:
- Log in to the back end.
- Choose Content > Article Manager.
- From the Select Category drop-down list, choose Animals
.
- Open the Koala article.
The Koala article contains two images. The first image is above a Read More link. The Read More link defines the content above it as intro text and the content below it as the remainder of the text for an article
.
Both images were inserted by clicking the Image button at the bottom of the Article Text editor.
Clicking Image opens a pop-up window to the Media Manager, where all the images used in your site content are catalogued
. When you select an image in the Media Manager, it loads that image into the article.
- Close the Media Manager.
- Close the Koala article.
- Click View Site.
- In the This Site menu, choose Sample Sites.
- In the Australian Parks menu, choose Image Gallery > Animals.
This is an example of one way to use images or create a gallery of image articles
.
- Click the “Read more: Koala” button.
The smaller image was embedded in the article’s intro text. The larger image was embedded in the article below the Read More link.
Your content can include any type of file that is allowed by the System Global Configuration settings. Videos, Flash files, PDFs, and documents are all catalogued in the Media Manager and can be inserted into an article.