1. Trang chủ
  2. » Công Nghệ Thông Tin

Joomla cho người mới bắt đầu part 12 doc

10 261 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 1,78 MB

Nội dung

Chapter 5 [ 117 ] Displaying sections and categories on your website Secons and categories are content containers; they tell Joomla! how to group things in the backend. Now, how do you get the content in those containers to show up on your website? You've already seen in Chapter 4 that you add a menu link to do this. Let's add a new menu link now to present the contents of the secon we just created to our visitors. Time for action – create a link to point to a section Creang a menu link to point to a secon or category takes these four steps: 1. Navigate to Menus | Main Menu and click on New. 2. In the Select Menu Item Type secon, select Arcles | Secon Blog Layout. 3. In the Menu Item : [New] screen, add a Title (i.e., News). In the Parameters (Basic), select the News secon in the Secon drop-down list. 4. Click on Save. As you can see in the following screenshot, News now shows up as the last item in the Menu Item Manager. The order in which Menu Items are presented here is the same order they'll have in the Main Menu on your website. If you would like to move the News link up in the Main Menu, just click on the arrows in the Order column as desired. In this example, we'll leave the order unchanged. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 118 ] 5. Click on Preview to check out what's changed on the frontend: On the home page, there's a new link added to the Main Menu: News On clicking this, the visitor will see an overview of the News secon. How are sections and categories displayed? The format of the secon overview page you just created on the frontend of your site is called a Secon Blog Layout. There is, however, much more to secon and categories content presentaon than just the Secon Blog Layout. You can choose to display secon contents in dierent formats. Moreover, you can have your menu link point directly to a specic category (instead of its parent secon). For now, presenng the contents of your secon and the underlying categories through the Secon Blog Layout format will do just ne; you'll learn about the other ways of displaying secon/category contents in Chapter 7. Have a go hero – create some new sections and categories Let's have a look at the SRUP site map again. To completely transfer the structure we designed on our napkin to the Joomla! backend we should add two more secons: Ugly Painngs and About SRUP. In the following design you can see which categories these secons should hold: Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 5 [ 119 ] Two more sections to add to the site Home Activities Ugly Painting News About SRUP Mission Contact Us General News articles Reviews Facts Lectures Meetings articles articlesarticles articles Who are SRUP? articles Add sections and categories You can now add these secons/categories by repeang the steps you took previously:  To create secons, navigate to Content | Secon Manager | New  To create categories, navigate to Content | Category Manager | New Add links Although the secons and categories are sll empty (they hold no arcles yet), it's a good idea to already add menu links to point to the new secons.  To add menu links, navigate to Menus | Main Menu and click on New. Add two secon links: a link to the Ugly Painngs secon (call this link Ugly Painngs) and a link to the About SRUP secon (let's call it, well, yes, About SRUP). Remove an unneeded article There's just one lile bit of unnished business remaining. Once you've created a new secon on Ugly Painngs you should remove all traces of its predecessor, the Uncategorized arcle called Introducing Ugly Painngs. There's no need for it anymore; we'll replace it with the new secon content. Let's trash both the arcle and the old menu link poinng to it:  Navigate to the Arcle Manager, select the arcle and click on the Trash buon in the toolbar.  To remove the redund ant menu link Introducing Ugly Painngs from the Main Menu, just navigate to Menus | Main Menu, select the link and click on the Trash buon in the toolbar. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 120 ] And what about the arcles? By adding some new secons and categories, you've made room for growth. We'll leave these containers empty for now; in the next chapters, we'll add arcles to them. Rening your site structure It's a fact of life: you probably won't get your site structure right in one go unless you've got a really simple, really stac site. It that a bad thing? No, it isn't—because websites evolve and Joomla! makes it easy to go ahead with a provisional structure and change things when needed. Maybe because new content has become available that has to go into a new secon. Or maybe because when you're actually adding content, you learn that your well-organized site isn't altogether logical aer all. That's ne; keeping a close eye on the structure of your website is a connuous process. And luckily, secons and categories, once dened, are not set in stone. You've seen how easy it is to add new ones, and it's equally simple to move content from one category to another. Time for action – move content from one category to another The Acvies secon contains some arcles that you might want to move to the News secon. Let's clean up the Acvies - Meengs category and move anything topical into the News - General News category: 1. Navigate to Content | Arcle Manager. From the list, select the items you want to move from the Meengs category to the General News category. In this example, we've selected two arcles: 2. Click on Move on the toolbar. You'll be taken to the Move Arcles screen: Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 5 [ 121 ] 3. In the Move to Secon/Category list, select News/General News. At the far right-hand side, you can check which arcles are being moved. 4. Click on Save. In the Arcle Manager screen, the three arcles are now part of the News secon. You can check this by clicking on the News link on the frontend Main Menu. What just happened? You've stood the real life challenge of content management! Now, you're not only able to create a sound content structure for your website, but you also know how to improve on it. By adding a new container for all news items and moving exisng news content there you've now made room for growth on the SRUP site. Have a go hero – moving entire categories Somemes you might want to move an enre category and all its contents to another secon. Try this out for yourself—it's not much dierent from moving arcles. Imagine you'd like to move the Reviews category from the Ugly Painngs secon to another secon. In the Category Manager, select the category you want to move and click on the Move buon. Select the secon you want to move things to, and click on Save. It's just as straighorward to move the enre category—including all of its arcle contents—back again. This exibility is great when you're seng up or rearranging your site. Renaming sections or categories As we've just seen, Joomla! allows you to easily rearrange your site structure and its contents. You can also rename secons and categories that already contain arcles; no content will be lost. Time for action – rename a section On your client's website there's an Acvies secon. Your client wants to make it clear this secon is not about acvies organized by other art sociees—it's only about SRUP. Could you please change the name of the secon to SRUP Acvies? It's a breeze. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 122 ] 1. Navigate to Content | Secon Manager and click on the tle of the Acvies secon to open it for eding. 2. In the Secon: [Edit] screen, change the Title to SRUP Acvies. 3. In the Alias: eld, remove the exisng alias (remember, the Alias is Joomla!'s internal name for the arcle used when creang user-friendly URLs). Leave this box blank; Joomla! will ll it with srup-acvies when you apply or save your changes. You can check that now by clicking on Apply. You'll noce the Alias box is lled out automacally. 4. Click on Save. What just happened? By changing a secon or category name, all of Joomla!'s internal references to the name are updated automacally. All arcles and categories in the renamed secon will reect the changes you made. In the Arcle Manager, for example, all items that belonged to the Acvies secon are now updated to show they are in the SRUP Acvies secon. No manual labor here—and more importantly, nothing is lost! On the frontend, the new secon name shows up on the secon overview page when the user clicks on the Acvies link: Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 5 [ 123 ] Have a go hero – name and rename! Using appropriate, short, and descripve labels for secons and categories (and for the menu links poinng to them) is really essenal. Aer all, these are the words that guide your visitors to the content you want them to discover. It's a good idea to tweak these labels unl you're perfectly happy with them. To modify the names of categories, navigate to the Category Manager; it's similar to changing secon names. Maybe you would like to change menu link labels too, as these don't automacally change with the category or secon name. Try to nd short and appropriate menu link labels. To change menu link labels, navigate to the Main Menu, select any of the menu items and change what's in the Title eld (that is, SRUP Acvies). When changing Titles (of Secons/Categories/Menu Link Items) make sure to clear the contents of the Alias box. Joomla! will automacally create an Alias for the new Title. Changing section and category settings You've already created a good deal of secons and categories without altering any of the de- fault sengs. In some cases, however, you might want some more control over the secon or category you're eding. In the table below you can see the opons that are available in the Secon/Category: [New] or Secon/Category: [Edit] screen. Basically, you can customize these sengs for two purposes:  To determine whet her a sec on or category is visi ble ( and w hich user groups can see it)  To add a short descripve text whenever the secon or categor y contents are displayed We'll cover both the Secon and Category edit screen in the overview next, as all sengs and opons are idencal. The only dierence is that when adding a category, Joomla! wants you to specify the secon that holds the new category. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 124 ] This is what the Secon: [New] and the Category: [New] screen look like: Adding or eding secons and categories: An overview of the sengs Title: The secon or category tle as it will be displayed. You can use lowercase, uppercase, and spaces. Alias: Leave the Alias: box blank. The Alias is the internal name of the item. When you save the secon, Joomla! will automacally ll in the secon name in lowercase leers without spaces or special characters. If the the Title is About SRUP, the alias will be about-srup. The Alias will be shown in the page URL (www.example.com/about-srup.html) when you acvate Joomla!'s special search engine friendly URLs (see Chapter 12 on aracng search engine trac). Published: Select Yes to show the secon, No if you want to hide it for your visitors. The laer can be useful when your site is live and you're preparing a new secon. That way, your site visitors won't know the secon is there unl you publish it. When you have nished the secon, click on Published: Yes. Secon: This drop-down select box appears in the Category screen only. Select the Secon it belongs to. Order: The Order seng determines the place of this item in the list of secons in the Secon Manager or the list of categories in the Category Manager. Seng a specic order is only relevant when a list of secons or categories is displayed as a list of hyperlinks. You can't change the Order value unl you have saved the secon. Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 5 [ 125 ] Adding or eding secons and categories: An overview of the sengs Access Level: Select an opon in the Access level to determine who has access to this secon: all users (Public), registered users (Registered), or users with administrator permissions (Special). The default value, Public, should be okay. When you start working with dierent user types on your site you can change sengs (see Chapter 9 on user access levels). Image: These last three opons aect how overview pages of secon or category contents are displayed. At the top of these pages an image and a short descripon can be shown. If you want to select an Image it has to be in the default Joomla! images folder: images/stories. The Image Posion determines where the image is displayed, relave to the descripon text. In the Descripon text editor area, you can enter and format a short descripve text introducing the subject of the secon or category. Secon and Category descripons can be displayed at the top of pages showing content overviews. For more on Images and Descripons, see Chapter 7 on secon and category overview pages. Image Posion: Descripon: Building a site without sections or categories In the previous chapter, you've already seen some examples of uncategorized arcles. When organizing your site content you might end up with arcles that do not belong in any category. These you can add as Uncategorized arcles. Usually, uncategorized arcles contain stac content, such as a mission statement or some legal informaon. Uncategorized pages are the odd ones out in a site that's for the main part organized through secons and categories. If you've got more than a handful of uncategorized pages, that might be a reason to rethink your content organizaon. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 126 ] What sites can you build with uncategorized content only? Somemes, Joomla!'s powerful mul-level site organizaon capabilies are just too much. Very small sites—"brochure sites" of some ve to ten pages—without secondary page levels, can consist of uncategorized arcles only. Let's say your local yoga teacher asks you to develop a website. She probably wouldn't need much more content than shown in the following diagram: Ana Sruputana Yoga About Yoga About me Class Schedules Contact In this case, there are no layers of content below the menu link level. There will probably be ve menu links: Home, About Yoga, About Me, Class Schedules, and Contact. Three of these will each point to an arcle (About Yoga, About Me, and Class Schedules). The Contact Page could also be a plain arcle, but let's assume this is—just like we've seen before—a contact form generated by Joomla!'s Contacts component. This is how we could translate the above site map in Joomla! terms: About Yoga About me Class Schedules Contact Home The boxes with grey doed outlines represent uncategorized arcles; the box with a grey background represents a special funconality page (in this case a contact form). Download at Wow! eBook WWW.WOWEBOOK.COM . the exisng alias (remember, the Alias is Joomla! 's internal name for the arcle used when creang user-friendly URLs). Leave this box blank; Joomla! will ll it with srup-acvies when. category, Joomla! wants you to specify the secon that holds the new category. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 124 ] This. the page URL (www.example.com/about-srup.html) when you acvate Joomla! 's special search engine friendly URLs (see Chapter 12 on aracng search engine trac). Published: Select Yes to

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

TỪ KHÓA LIÊN QUAN