Joomla cho người mới bắt đầu part 15 ppsx

10 278 0
Joomla cho người mới bắt đầu part 15 ppsx

Đang tải... (xem toàn văn)

Thông tin tài liệu

Chapter 6 [ 147 ] Time for action – creating an intro text In the arcles you created in earlier chapters, you've already seen it's good to add a separate intro text to an arcle. Now you know why; if you don't, the arcle can only be displayed fully on overview pages such as the secon overview you just saw. Let's x things by adding an intro text to our new arcle. 1. Navigate to Content | Arcle Manager and open the arcle that you just created (Just What are Ugly Painngs?) to edit it. 2. In the text editor screen, add a new rst line. In this example, we've entered The Characteriscs of True Ugliness: how do you recognize them? 3. Place the cursor just aer this rst line to indicate that you want Joomla! to split the arcle here, and create a Read More link to point to the full arcle, click on the Read More buon at the boom of the editor screen. A red doed 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 arcle 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 Painngs link. Download at Wow! eBook WWW.WOWEBOOK.COM Creang Killer Content: Adding and Eding Arcles [ 148 ] Mission accomplished! Now, only the intro text and Read more link of the new arcle appear on the secon overview page: More teaser texts will be added to the overview when you add more arcles to the secon. The full ve paragraph arcle is shown (without the teaser text) when the visitor clicks on the Read more link: Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 6 [ 149 ] What just happened? In principle, any arcle in Joomla! can consist of one connuous text. Especially when wring short arcles (think of blog posts), one lump of text can suce. But in many cases you'll want to split arcles into an introductory text (a teaser text, in newspaper terms) and the actual arcle body text, allowing Joomla! to publish the two parts on separate pages. Creating multi-page articles Suppose you have a long arcle with several subheadings, each covering various sub-topics that all have something to do with each other. Somemes, you may nd such an arcle is too long. It doesn't t the content screen, you don't want the visitor to have to scroll all that much. There's a tedious soluon to this. It involves manually spling the arcle by creang several individual short arcles. But luckily, there's also a quick way out. By adding page breaks in a single arcle, Joomla! will display this single arcle in the frontend as a series of separate pages, automacally adding navigaon 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 arcle on ugly painngs. Instead of having one arcle with several subheadings, they'd rather see some short pages that explain things step by step. To do this, we'll edit the exisng arcle: 1. Navigate to Content | Arcle Manager and open the Just What is Ugly Art? arcle to edit it. 2. Select the page break locaons. This is where Joomla! will split the arcle into separate pages. In this example, we'll replace every subheading by a page break. Select the rst subheading (Abstract Chaos) and delete it. Now click on the Page Break buon at the boom of the editor screen. A pop-up screen shows: Download at Wow! eBook WWW.WOWEBOOK.COM Creang Killer Content: Adding and Eding Arcles [ 150 ] 3. In the pop-up screen, enter the Page Title and Table of Contents Alias.  Page Title: Enter a tle for the new page. It will be displayed next to the arcle tle, separated by a dash: Just What are Ugly Painngs? – Abstract Chaos.  Table of Contents Alias: This is the link text that will appear in the Table of Contents of the mul-page arcle. 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 doed line is inserted to indicate the locaon of the page break. 5. Repeat Steps 2 to 4 for each page break required and save the arcle. Click on Preview to have a look at the frontend results. In the frontend Main Menu, click on Ugly Painngs and locate the intro text of the Just what is Ugly Art? arcle. Click on the Read More link. Now, instead of one arcle Joomla! has created a series of interlinked arcle pages. The rst page the visitor sees is the rst (sub) page. Pages include << Prev – Next >> links to the previous and next page; the Table of Content's Aliases you've entered when creang page breaks now show up as hyperlinks in the Arcle Index (a table of contents featured on every sub page): Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 6 [ 151 ] What just happened? Joomla! lets you add page breaks to spread the content of a single arcle over mulple pages. To allow the visitor to move back and forth, a Table of Contents secon and Previous and Next navigaon is automacally added to mul-page arcles. Use it wisely Working with page breaks gives you an extra level of content below the arcle level. You shouldn't, however, overuse this feature. Usually, visitors don't like clicking mulple links to read an arcle. It's best to reserve mul-page navigaon for arcles that easily break into logical chunks, such as step-by-step tutorials or porolio pages showing dierent clients and projects. Download at Wow! eBook WWW.WOWEBOOK.COM Creang Killer Content: Adding and Eding Arcles [ 152 ] Alternave page display techniques: Tabs and accordions There are many creave ways to put a lot of content on a single page, without displaying it all simultaneously. One of these is using tabs. Inially the visitor only sees the contents of the rst 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 mulple content panels and display them one at a me. 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 eding an arcle, you can set a wide array of parameters. These allow you to control exactly which arcle details are shown, when the arcle will be published, and so on. It's a good idea to explore the opons to make sure what combinaon of seng ts your needs best. The following is an overview of the sengs you can choose per arcle: Parameters (Article) Author, Author Alias The default Author name is Administrator. If you want another name to appear with the arcle, 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 seng 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 arcle. By changing the date, you can bring an exisng arcle to the aenon of the visitor because it will reappear in pages with new items. Start Publishing, Finish Publishing Somemes, you'll have prepared content that should only be published for a given period of me; think of a temporary promoon, 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 automacally unpublish content aer a certain period. Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 6 [ 153 ] Parameters (Advanced) Show Title, Intro Text, Secon Name, Category Title, Arcle Rang, Author Name, Created Date and Time, Modied Date and Time, PDF Icon, Print Icon, E-mail Icon These Parameters control which details should be displayed with the arcle (either in Blog Layout view or in full arcle view), as shown in the following screenshot. In the example below, all extras are set to show. This results in a lot of "arcle cluer"; it's hard to nd the real content in this detail overkill. It's best to only display one or two details – if they add useful informaon. Seng Arcle Rang to Show will display a ve point scale below the arcle tle when the full arcle is shown; visitors can rate the arcle: Title Linkable (Secon Title Linkable, Category Title Linkable) When set to Show, an arcle Title or Secon or Category name can be linkable; the visitor can click on it to navigate to the arcle/secon/category. Content Language, Key Reference These advanced opons are only relevant when you have a mullingual site. Download at Wow! eBook WWW.WOWEBOOK.COM Creang Killer Content: Adding and Eding Arcles [ 154 ] Alternave Read more: text Entering a Read more text will replace the default Read more link with something specic to the arcle: On the frontend, it will be shown as follows: Filling out the Alternave Read more: text is good for the ndability of your content. Search engines aach greater importance to a custom link (Recognizing Ugly Art) than to default text Read more. It's beer for usability too, as it allows you to beer guide your visitors towards the arcle content. Metadata Information Descripon, Keywords, Robots, Author Metadata informaon is used by search engines. You can add an arcle descripon and keywords to help search engines index your content. You'll read more on this in Chapter 12. Seng preferences for all new arcles at once You'll probably want to set some preferences for all your arcles at once: whether you want the author name displayed, whether the tle should be a hyperlink, and so on. To enter these site-wide arcle preferences, navigate to Content | Arcle Manager and click on the Parameters buon in the toolbar. Aer you have chosen the appropriate sengs, these will apply to all new arcles, so it's a good idea to choose these sengs before the bulk of your site content is created. Of course, you can override these general sengs by seng specic parameter choices when eding individual arcles. Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 6 [ 155 ] Archiving articles Your website is growing and there's a steady stream of new content. Now what can you do with arcles that are outdated? Of course, you can just unpublish them. That way they're sll available in the backend, but the site visitor cannot see them anymore. Another opon is to create an archive. Archived arcles are sll 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 | Arcle Manager. In the Select Category lter box, select General News to see only the arcles in that category. 2. Select two news arcles to be archived. In the following example, we've selected New Ugly Painngs Discovered and Bob Ross Exhibion Announced: 3. Click on the Archive buon in the toolbar. A message appears to conrm both arcles are archived. The arcle tles have changed to grey and the word [Archived] is displayed next to the tle. Download at Wow! eBook WWW.WOWEBOOK.COM Creang Killer Content: Adding and Eding Arcles [ 156 ] You've created a (ny) 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 Arcles|ArchivedArcle List. Enter a Title for the hyperlink: News Archive. Adjust any other sengs you like and click on Save. On the frontend, a link to the Archive is shown. The visitor can lter (search) archived arcles by keyword or publicaon date: What just happened? You've created an archive for outdated arcles. 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 arcles get a dierent URL. This is a disadvantage because exisng links from other sites to your now archived contents will be broken. You cannot edit archived arcles. If you do want to change the content of an archived arcle, you have to rst unarchive it (using the Unarchive buon in the Arcle Manager toolbar) to make it an ordinary arcle. Aer you've made changes, archive it again. Download at Wow! eBook WWW.WOWEBOOK.COM . text (a teaser text, in newspaper terms) and the actual arcle body text, allowing Joomla! to publish the two parts on separate pages. Creating multi-page articles Suppose you have a long arcle. featured on every sub page): Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 6 [ 151 ] What just happened? Joomla! lets you add page breaks to spread the content of a single arcle over mulple. Parameters buon in the toolbar. Aer you have chosen the appropriate sengs, these will apply to all new arcles, so it's a good idea to choose these sengs before the bulk of your site

Ngày đăng: 04/07/2014, 16:21

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan