Creating Articles in Joomla

Excerpt from Beginning Joomla! Website Development

By Cory Webb

An article is the main way that content is displayed in a Joomla! site. Articles can be organized into categories and sections, or they can be uncategorized. The term “content item” was used in Joomla! 1.0, but that phrase has been deprecated in favor of the term “article.” You will often catch people like me, who have been around Joomla! since before it was Joomla!, still referring to articles as content items. Just know that they are one in the same.

Try It Out Creating an Article

To create an article:

  1. Navigate to the Article Manager in your Joomla! administrator. You can access the Article Manager from the content menu, as shown in Figure 4-1.
  2. Once you are in the Article Manager, click the New button in the toolbar to open the new article form. You can see the new article form in Figures 4-6, 4-7, 4-8, and 4-9.
  3. Enter a title for your article. This field is mandatory.
  4. Enter an alias for your article. This field is not mandatory, but if you do not enter an alias, one will be generated automatically.
  5. Set the value of Published to Yes if you want the article to be published, or set it to No if you do not want the article to be published.
  6. Set the value of Front Page to Yes if you want the article to display in the Front Page view of the content component, or set it to No if you do not want it to display in the Front Page view.
  7. Select the section to which you want this article to belong. You must select a section before you select a category, because selecting a section will pre-populate the Category drop-down list with categories that belong to that section. Selecting a section is mandatory, although you could select “Uncategorized” as your section.
  8. Select the category to which you want this article to belong. Selecting a category is mandatory. If you selected “Uncategorized” for your section, then “Uncategorized” is automatically selected as your category.
  9. In the main text editor, begin to enter your content.
  10. Click the Read more button below the content editor to add a breaking point in the article that separates introductory text from the rest of the text. You can add only one Read more separator per article. This is useful if the article is going into a blog or news-style category or section because on the category or section page, only the introductory text is displayed and a Read more link is included to direct the reader to the rest of the article.
  11. Add pictures to your article using the Image button below the main text editor. This button will pop up a window that gives you access to the media manager, shown in Figure 4-7, and thumbnails of each image in your images directory. With that, you can select an image, set its alignment, and add alternate text, a title, and a caption to the image, and the image will then be added to your article when you click the Insert button.
  12. To add page breaks to your article, click the Pagebreak button, shown in Figure 4-8, just beneath the main text editor. You can add as many page breaks as you want to split up your article into as many pages as you want.
  13. In the right column, set your parameters and metadata information however you need them to be set. You can see an explanation of each parameter and metadata information in the Article Parameters, Advanced Parameters, and Metadata Information tables.
  14. Click the Save button in the toolbar to save your new article and return to the Article Manager. If you want to save your new article, but remain in the article form, click the Apply button.

Figure 4-1

Figure 4-6

Figure 4-7

Figure 4-8

Figure 4-9

How It Works

In Figure 4-6, you can see the key elements of creating a new article in the left column. These elements are Title, Alias, Published, Front Page, Section, Category, and Text (not labeled, but it’s hard to miss it…it’s the one with the big text area WYSIWYG editor). The Title is just the title of the article, and the Alias is used primarily for SEF URLs. The Front Page parameter tells whether or not the article will be published in the Front Page view, which is a blog-style layout of all sections and categories that you learn more about in Chapter 5. You must select a Section and a Category before you can save your article. If you have not set up any sections or categories yet, the only options available in these drop-downs will be Uncategorized. Once you select a Section, the Category drop-down will be populated with the available categories in the selected Section. You can move an article from one section and category to another at any time with this form, so you are not locked in, which is good if you have a fear of commitment.

The ability to use WYSIWYG editors makes adding text and pictures to your content as easy as using a modern word processor. As you learned in Chapter 1, in Joomla!, WYSIWYG editors are plugins that load a word-processor–style text editor so that you can easily make changes to the look and feel of the content and see the content in the editor as it would appear on a page in your site. You can use one of the core WYSIWYG editors, which you learned about in Chapter 2, or you can install a third-party WYSIWYG editor, some of which are listed in Appendix C.

At the bottom of the Text WYSIWYG editor, there is a Read more button as shown in Figure 4-8. This button is used to add a divider between introductory text and the rest of the text of the article. The Read more divider is optional, and leaving it out simply means that all of the content of the article will be treated as introductory text. The divider is important for blog layouts of sections and categories because it provides a way to display a short excerpt of an article in the blog layout while displaying a Read more link that links to the rest of the text.

Another button beneath the WYSIWYG editor is the Image button, which provides a way to upload images and select from your site’s image directory to add to pictures your article. This uses an AJAX pop-up window to give you access to your site’s media manager, shown in Figure 4-7.

The other button beneath the WYSIWYG editor is the Pagebreak button. This gives you the ability to split your article into pages. This can be particularly useful for really long articles. You simply place your cursor within the text where you want to add a page break, and click the button. This uses an AJAX pop-up window to bring up a form in which you add a page title and a table of contents alias for the new page. The WYSIWYG editor will display a visual indicator of where you added the page break.

Tags:

Comments

One response to “Creating Articles in Joomla”

  1. jminatel says:

    Please email any login/account questions to p2padmin@wrox.com and we’ll try to get it fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *