[ 147 ]Time for action – creating an intro text In the articles you created in earlier chapters, you've already seen it's good to add a separate intro text to an article.. Now you know w
Trang 1[ 147 ]
Time for action – creating an intro text
In the articles you created in earlier chapters, you've already seen it's good to add a separate intro text to an article Now you know why; if you don't, the article can only be displayed fully on overview pages such as the section overview you just saw Let's fix things by adding
an intro text to our new article
1. Navigate to Content | Article Manager and open the article that you just created (Just What are Ugly Paintings?) to edit it.
2. In the text editor screen, add a new first line In this example, we've entered
The Characteristics of True Ugliness: how do you recognize them?
3. Place the cursor just after this first line to indicate that you want Joomla! to split the article here, and create a Read More link to point to the full article, click on the
Read More button at the bottom of the editor screen A red dotted line appears:
4. In the Parameters (Advanced) panel, set Intro Text to Hide This means the
intro text (in this case the short teaser text we just created) will be hidden
when the full article is shown It will be shown on overview pages
5. Click on Apply and then click on Preview to see the output on the frontend You'll be taken to the frontend home page In the Main Menu, click on the Ugly Paintings link.
Download at Wow! eBook
WWW.WOWEBOOK.COM
Trang 2Mission accomplished! Now, only the intro text and Read more link of the new article appear
on the section overview page:
More teaser texts will be added to the overview when you add more articles to the section The full five paragraph article is shown (without the teaser text) when the visitor clicks on
the Read more link:
Trang 3[ 149 ]
What just happened?
In principle, any article in Joomla! can consist of one continuous text Especially when writing short articles (think of blog posts), one lump of text can suffice But in many cases you'll want
to split articles into an introductory text (a teaser text, in newspaper terms) and the actual article body text, allowing Joomla! to publish the two parts on separate pages
Creating multi-page articles
Suppose you have a long article with several subheadings, each covering various sub-topics that all have something to do with each other Sometimes, you may find such an article is too long It doesn't fit the content screen, you don't want the visitor to have to scroll all that much
There's a tedious solution to this It involves manually splitting the article by creating several individual short articles But luckily, there's also a quick way out By adding page breaks in
a single article, Joomla! will display this single article in the frontend as a series of separate pages, automatically adding navigation links and a table of contents
Time for action – using page breaks to split up an article
Let's say your client doesn't like the one page article on ugly paintings Instead of having one article with several subheadings, they'd rather see some short pages that explain things step
by step To do this, we'll edit the existing article:
1. Navigate to Content | Article Manager and open the Just What is Ugly Art? article
to edit it
2. Select the page break locations This is where Joomla! will split the article into separate pages In this example, we'll replace every subheading by a page break
Select the first subheading (Abstract Chaos) and delete it Now click on the Page
Break button at the bottom of the editor screen A pop-up screen shows:
Download at Wow! eBook
WWW.WOWEBOOK.COM
Trang 43 In the pop-up screen, enter the Page Title and Table of Contents Alias.
Page Title: Enter a title for the new page It will be displayed next
to the article title, separated by a dash:
Just What are Ugly Paintings? – Abstract Chaos.
Table of Contents Alias: This is the link text that will appear in the
Table of Contents of the multi-page article The Alias and the Page Title can be the same, however, it's best to keep the Alias text as short as possible
4. Click on Insert Page Break The pop-up screen closes and a grey dotted
line is inserted to indicate the location of the page break
5. Repeat Steps 2 to 4 for each page break required and save the article
Click on Preview to have a look at the frontend results In the frontend
Main Menu, click on Ugly Paintings and locate the intro text of the
Just what is Ugly Art? article Click on the Read More link.
Now, instead of one article Joomla! has created a series of interlinked article pages The
first page the visitor sees is the first (sub) page Pages include << Prev – Next >> links to the
previous and next page; the Table of Content's Aliases you've entered when creating page
breaks now show up as hyperlinks in the Article Index (a table of contents featured on every
sub page):
Trang 5[ 151 ]
What just happened?
Joomla! lets you add page breaks to spread the content of a single article over multiple pages To allow the visitor to move back and forth, a Table of Contents section and
Previous and Next navigation is automatically added to multi-page articles
Use it wisely
Working with page breaks gives you an extra level of content below the article level You shouldn't, however, overuse this feature Usually, visitors don't like clicking multiple links
to read an article It's best to reserve multi-page navigation for articles that easily break into logical chunks, such as step-by-step tutorials or portfolio pages showing different clients and projects
Download at Wow! eBook
WWW.WOWEBOOK.COM
Trang 6Alternative page display techniques: Tabs and accordions
There are many creative ways to put a lot of content on a single page,
without displaying it all simultaneously One of these is using tabs Initially
the visitor only sees the contents of the first tab panel When they click on
another tab, the corresponding content panel becomes visible instead
Another commonly used trick is called the accordion This allows you to
provide multiple content panels and display them one at a time Panels slide out and slide in on a mouse click
You can create both tabbed pages and accordions using Joomla! extensions
In Chapter 10 you'll learn how to install and apply them
Tweaking the details: Changing article settings
When editing an article, you can set a wide array of parameters These allow you to control exactly which article details are shown, when the article will be published, and so on It's a good idea to explore the options to make sure what combination of setting fits your needs best The following is an overview of the settings you can choose per article:
Parameters (Article)
Author, Author Alias The default Author name is Administrator If you want another
name to appear with the article, you can enter an Alias This name will appear as the author name (provided that the Author name is
set to show in the Parameters (Advanced)).
Access Level This setting is important if you want to control if pages are accessible
only to registered visitors See Chapter 9 on user management
Created Date Change this value to manipulate the Created Date that Joomla!
can display with any article By changing the date, you can bring
an existing article to the attention of the visitor because it will reappear in pages with new items
Start Publishing, Finish
Publishing
Sometimes, you'll have prepared content that should only
be published for a given period of time; think of a temporary
promotion, or a special New Years message Use Start Publishing to
enter the date when the new page should appear on the site; set a
date in the Finish Publishing box to automatically unpublish content
after a certain period
Trang 7[ 153 ]
Parameters (Advanced)
Show Title, Intro Text,
Section Name, Category
Title, Article Rating, Author
Name, Created Date and
Time, Modified Date and
Time, PDF Icon, Print Icon,
E-mail Icon
These Parameters control which details should be displayed with the article (either in Blog Layout view or in full article view), as shown in the following screenshot
In the example below, all extras are set to show This results in a lot of "article clutter"; it's hard to find the real content in this detail overkill It's best to only display one or two details – if they add useful information
Setting Article Rating to Show will display a five point scale below the article title when the full article is shown; visitors can rate the article:
Title Linkable (Section Title
Linkable, Category Title
Linkable)
When set to Show, an article Title or Section or Category name
can be linkable; the visitor can click on it to navigate to the article/section/category
Content Language, Key
Reference These advanced options are only relevant when you have a
multilingual site
Download at Wow! eBook
WWW.WOWEBOOK.COM
Trang 8Alternative Read more: text Entering a Read more text will replace the default Read more link
with something specific to the article:
On the frontend, it will be shown as follows:
Filling out the Alternative Read more: text is good for the
findability of your content Search engines attach greater importance to a custom link (Recognizing Ugly Art) than to default text Read more It's better for usability too, as it allows you to better guide your visitors towards the article content
Metadata Information
Description, Keywords,
Robots, Author
Metadata information is used by search engines You can add an article description and keywords to help search engines index your content You'll read more on this in Chapter 12
Setting preferences for all new articles at once
You'll probably want to set some preferences for all your articles at once:
whether you want the author name displayed, whether the title should be a hyperlink, and so on To enter these site-wide article preferences, navigate to
Content | Article Manager and click on the Parameters button in the toolbar
After you have chosen the appropriate settings, these will apply to all new
articles, so it's a good idea to choose these settings before the bulk of your site content is created Of course, you can override these general settings by setting specific parameter choices when editing individual articles
Trang 9[ 155 ]
Archiving articles
Your website is growing and there's a steady stream of new content Now what can you do with articles that are outdated? Of course, you can just unpublish them That way they're still available in the backend, but the site visitor cannot see them anymore
Another option is to create an archive Archived articles are still available, but they're no longer part of the "normal" site contents
Time for action – creating a news archive
Let's create an archive for some old news pages on the SRUP site:
1. Navigate to Content | Article Manager In the Select Category filter box, select
General News to see only the articles in that category.
2. Select two news articles to be archived In the following example, we've selected
New Ugly Paintings Discovered and Bob Ross Exhibition Announced:
3. Click on the Archive button in the toolbar A message appears to confirm both
articles are archived The article titles have changed to grey and the word
[Archived]
is displayed next to the title
Download at Wow! eBook
WWW.WOWEBOOK.COM
Trang 10You've created a (tiny) news archive now, but there's no way for the visitor to see the
contents Let's create a link:
4. Navigate to Menus| Main Menu| New Click on Articles|ArchivedArticle List Enter a Title for the hyperlink: News Archive Adjust any other settings you like and click on Save.
On the frontend, a link to the Archive is shown The visitor can filter (search) archived articles
by keyword or publication date:
What just happened?
You've created an archive for outdated articles The visitor can see an overview of the
archive contents by clicking on the News Archive link in the Main Menu Although this
archiving system can be useful, there's a catch; archived articles get a different URL This
is a disadvantage because existing links from other sites to your now archived contents will be broken
You cannot edit archived articles If you do want to change the content
of an archived article, you have to first unarchive it (using the Unarchive