You are currently viewing the BOOK Beginning Joomla! Web Site Development ISBN 978-0-470-43853-4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
This article is exerpted from chapter 4 "Managing Content" of the Wrox book Beginning Joomla! Website Development by Cory Webb and is reused by permission of the publisher. This may not be reused without publisher permission Creating Articles in Joomla
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:
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.
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.
Enter a title for your article. This field is mandatory.
Enter an alias for your article. This field is not mandatory, but if you do not enter an alias, one will be generated automatically.
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.
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.
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.
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.
In the main text editor, begin to enter your content.
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.
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.
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.
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.
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.
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.