Chapter 5 [ 117 ] Displaying sections and categories on your website Secons 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 secon we just created to our visitors. Time for action – create a link to point to a section Creang a menu link to point to a secon or category takes these four steps: 1. Navigate to Menus | Main Menu and click on New. 2. In the Select Menu Item Type secon, select Arcles | Secon Blog Layout. 3. In the Menu Item : [New] screen, add a Title (i.e., News). In the Parameters (Basic), select the News secon in the Secon 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 Eecvely [ 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 secon. How are sections and categories displayed? The format of the secon overview page you just created on the frontend of your site is called a Secon Blog Layout. There is, however, much more to secon and categories content presentaon than just the Secon Blog Layout. You can choose to display secon contents in dierent formats. Moreover, you can have your menu link point directly to a specic category (instead of its parent secon). For now, presenng the contents of your secon and the underlying categories through the Secon Blog Layout format will do just ne; you'll learn about the other ways of displaying secon/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 secons: Ugly Painngs and About SRUP. In the following design you can see which categories these secons 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 secons/categories by repeang the steps you took previously: To create secons, navigate to Content | Secon Manager | New To create categories, navigate to Content | Category Manager | New Add links Although the secons and categories are sll empty (they hold no arcles yet), it's a good idea to already add menu links to point to the new secons. To add menu links, navigate to Menus | Main Menu and click on New. Add two secon links: a link to the Ugly Painngs secon (call this link Ugly Painngs) and a link to the About SRUP secon (let's call it, well, yes, About SRUP). Remove an unneeded article There's just one lile bit of unnished business remaining. Once you've created a new secon on Ugly Painngs you should remove all traces of its predecessor, the Uncategorized arcle called Introducing Ugly Painngs. There's no need for it anymore; we'll replace it with the new secon content. Let's trash both the arcle and the old menu link poinng to it: Navigate to the Arcle Manager, select the arcle and click on the Trash buon in the toolbar. To remove the redund ant menu link Introducing Ugly Painngs from the Main Menu, just navigate to Menus | Main Menu, select the link and click on the Trash buon in the toolbar. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 120 ] And what about the arcles? By adding some new secons and categories, you've made room for growth. We'll leave these containers empty for now; in the next chapters, we'll add arcles to them. Rening 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 stac 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 secon. Or maybe because when you're actually adding content, you learn that your well-organized site isn't altogether logical aer all. That's ne; keeping a close eye on the structure of your website is a connuous process. And luckily, secons and categories, once dened, 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 Acvies secon contains some arcles that you might want to move to the News secon. Let's clean up the Acvies - Meengs category and move anything topical into the News - General News category: 1. Navigate to Content | Arcle Manager. From the list, select the items you want to move from the Meengs category to the General News category. In this example, we've selected two arcles: 2. Click on Move on the toolbar. You'll be taken to the Move Arcles screen: Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 5 [ 121 ] 3. In the Move to Secon/Category list, select News/General News. At the far right-hand side, you can check which arcles are being moved. 4. Click on Save. In the Arcle Manager screen, the three arcles are now part of the News secon. 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 exisng news content there you've now made room for growth on the SRUP site. Have a go hero – moving entire categories Somemes you might want to move an enre category and all its contents to another secon. Try this out for yourself—it's not much dierent from moving arcles. Imagine you'd like to move the Reviews category from the Ugly Painngs secon to another secon. In the Category Manager, select the category you want to move and click on the Move buon. Select the secon you want to move things to, and click on Save. It's just as straighorward to move the enre category—including all of its arcle contents—back again. This exibility is great when you're seng 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 secons and categories that already contain arcles; no content will be lost. Time for action – rename a section On your client's website there's an Acvies secon. Your client wants to make it clear this secon is not about acvies organized by other art sociees—it's only about SRUP. Could you please change the name of the secon to SRUP Acvies? It's a breeze. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 122 ] 1. Navigate to Content | Secon Manager and click on the tle of the Acvies secon to open it for eding. 2. In the Secon: [Edit] screen, change the Title to SRUP Acvies. 3. In the Alias: eld, remove the exisng alias (remember, the Alias is Joomla!'s internal name for the arcle used when creang user-friendly URLs). Leave this box blank; Joomla! will ll it with srup-acvies when you apply or save your changes. You can check that now by clicking on Apply. You'll noce the Alias box is lled out automacally. 4. Click on Save. What just happened? By changing a secon or category name, all of Joomla!'s internal references to the name are updated automacally. All arcles and categories in the renamed secon will reect the changes you made. In the Arcle Manager, for example, all items that belonged to the Acvies secon are now updated to show they are in the SRUP Acvies secon. No manual labor here—and more importantly, nothing is lost! On the frontend, the new secon name shows up on the secon overview page when the user clicks on the Acvies link: Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 5 [ 123 ] Have a go hero – name and rename! Using appropriate, short, and descripve labels for secons and categories (and for the menu links poinng to them) is really essenal. Aer 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 unl you're perfectly happy with them. To modify the names of categories, navigate to the Category Manager; it's similar to changing secon names. Maybe you would like to change menu link labels too, as these don't automacally change with the category or secon 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 Acvies). When changing Titles (of Secons/Categories/Menu Link Items) make sure to clear the contents of the Alias box. Joomla! will automacally create an Alias for the new Title. Changing section and category settings You've already created a good deal of secons and categories without altering any of the de- fault sengs. In some cases, however, you might want some more control over the secon or category you're eding. In the table below you can see the opons that are available in the Secon/Category: [New] or Secon/Category: [Edit] screen. Basically, you can customize these sengs 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 descripve text whenever the secon or categor y contents are displayed We'll cover both the Secon and Category edit screen in the overview next, as all sengs and opons are idencal. The only dierence is that when adding a category, Joomla! wants you to specify the secon that holds the new category. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 124 ] This is what the Secon: [New] and the Category: [New] screen look like: Adding or eding secons and categories: An overview of the sengs Title: The secon 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 secon, Joomla! will automacally ll in the secon name in lowercase leers 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 acvate Joomla!'s special search engine friendly URLs (see Chapter 12 on aracng search engine trac). Published: Select Yes to show the secon, No if you want to hide it for your visitors. The laer can be useful when your site is live and you're preparing a new secon. That way, your site visitors won't know the secon is there unl you publish it. When you have nished the secon, click on Published: Yes. Secon: This drop-down select box appears in the Category screen only. Select the Secon it belongs to. Order: The Order seng determines the place of this item in the list of secons in the Secon Manager or the list of categories in the Category Manager. Seng a specic order is only relevant when a list of secons or categories is displayed as a list of hyperlinks. You can't change the Order value unl you have saved the secon. Download at Wow! eBook WWW.WOWEBOOK.COM Chapter 5 [ 125 ] Adding or eding secons and categories: An overview of the sengs Access Level: Select an opon in the Access level to determine who has access to this secon: all users (Public), registered users (Registered), or users with administrator permissions (Special). The default value, Public, should be okay. When you start working with dierent user types on your site you can change sengs (see Chapter 9 on user access levels). Image: These last three opons aect how overview pages of secon or category contents are displayed. At the top of these pages an image and a short descripon can be shown. If you want to select an Image it has to be in the default Joomla! images folder: images/stories. The Image Posion determines where the image is displayed, relave to the descripon text. In the Descripon text editor area, you can enter and format a short descripve text introducing the subject of the secon or category. Secon and Category descripons can be displayed at the top of pages showing content overviews. For more on Images and Descripons, see Chapter 7 on secon and category overview pages. Image Posion: Descripon: Building a site without sections or categories In the previous chapter, you've already seen some examples of uncategorized arcles. When organizing your site content you might end up with arcles that do not belong in any category. These you can add as Uncategorized arcles. Usually, uncategorized arcles contain stac content, such as a mission statement or some legal informaon. Uncategorized pages are the odd ones out in a site that's for the main part organized through secons and categories. If you've got more than a handful of uncategorized pages, that might be a reason to rethink your content organizaon. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 126 ] What sites can you build with uncategorized content only? Somemes, Joomla!'s powerful mul-level site organizaon capabilies are just too much. Very small sites—"brochure sites" of some ve to ten pages—without secondary page levels, can consist of uncategorized arcles 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 arcle (About Yoga, About Me, and Class Schedules). The Contact Page could also be a plain arcle, 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 doed outlines represent uncategorized arcles; the box with a grey background represents a special funconality page (in this case a contact form). Download at Wow! eBook WWW.WOWEBOOK.COM . the exisng alias (remember, the Alias is Joomla! 's internal name for the arcle used when creang user-friendly URLs). Leave this box blank; Joomla! will ll it with srup-acvies when. category, Joomla! wants you to specify the secon that holds the new category. Download at Wow! eBook WWW.WOWEBOOK.COM Small Sites, Big Sites: Organizing your Content Eecvely [ 124 ] This. the page URL (www.example.com/about-srup.html) when you acvate Joomla! 's special search engine friendly URLs (see Chapter 12 on aracng search engine trac). Published: Select Yes to