Tải bản đầy đủ (.pdf) (10 trang)

Joomla cho người mới bắt đầu part 19 pot

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.65 MB, 10 trang )

Chapter 7
[ 187 ]
TTThhheee pppooowwweeerrr ooofff DDDeeessscccrrriiipppooonnnsss
IIInnn ttthhheee PPPaaarrraaammmeeettteeerrrsss (((BBBaaasssiiiccc))),,, yyyooouuu cccaaannn ssseeettt DDDeeessscccrrriiipppooonnn,,, DDDeeessscccrrriiipppooonnn IIImmmaaagggeee,,, aaannnddd
CCCaaattteeegggooorrryyy DDDeeessscccrrriiipppooonnn tttooo ssshhhooowww TTThhhiiisss mmmaaakkkeeesss aaa bbbiiiggg dddiiieeerrreeennnccceee;;; aaaeeerrr aaallllll,,, iiinnn iiitttsss
sssiiimmmpppllleeesssttt fffooorrrmmm aaa LLLiiisssttt LLLaaayyyooouuuttt pppaaagggeee iiisss ppprrreeeyyy bbbaaarrreee BBByyy aaaddddddiiinnnggg dddeeessscccrrriiipppooonnnsss yyyooouuu
cccaaannn mmmaaakkkeee ttthhheee pppaaagggeee aaa llliiillleee mmmooorrreee iiinnnttteeerrreeesssnnnggg aaannnddd eeexxxppplllaaaiiinnn wwwhhhaaattt ttthhheee ssseeecccooonnn
aaannnddd cccaaattteeegggooorrriiieeesss aaarrreee aaallllll aaabbbooouuuttt YYYooouuu aaadddddd dddeeessscccrrriiipppooonnnsss bbbyyy eeedddiiinnnggg ttthhheee ppprrrooopppeeerrreeesss
ooofff aaa ssseeecccooonnn ooorrr cccaaattteeegggooorrryyy iiitttssseeelllfff (((ttthhhrrrooouuuggghhh CCCooonnnttteeennnttt ||| SSSeeecccooonnn MMMaaannnaaagggeeerrr ooorrr
CCCooonnnttteeennnttt ||| CCCaaattteeegggooorrryyy MMMaaannnaaagggeeerrr;;; ssseeeeee CCChhhaaapppttteeerrr 555 ooonnn ssseeecccooonnnsss aaannnddd cccaaattteeegggooorrriiieeesss)))
TTThhheee fffooollllllooowwwiiinnnggg ssscccrrreeeeeennnssshhhooottt ssshhhooowwwsss aaa SSSeeecccooonnn LLLiiisssttt LLLaaayyyooouuuttt wwwiiittthhh aaa DDDeeessscccrrriiipppooonnn
ooofff bbbooottthhh ttthhheee ssseeecccooonnn aaannnddd ooofff ttthhheee tttwwwooo cccaaattteeegggooorrriiieeesss iiinnn iiittt AAAsss yyyooouuu cccaaannn ssseeeeee,,, aaa
dddeeessscccrrriiipppooonnn cccaaannn aaalllsssooo cccooonnntttaaaiiinnn pppiiiccctttuuurrreeesss
DDDooowwwnnnllloooaaaddd aaattt WWWooowww!!! eeeBBBooooookkk
WWWWWWWWW WWWOOOWWWEEEBBBOOOOOOKKK CCCOOOMMM
Welcoming Your Visitors: Creang Aracve Home Pages and Overview Pages
[ 188 ]
Parameters (Advanced)
The advanced parameters give you some more control over the order of categories on a
secon list page.
Order In what order should the categories be displayed? You can order them
alphabecally by tle, reversed alphabecally,
or in the default order that the categories have in the
Category Manager.
Arcle Order The order of the list of arcles your visitors see when they click on
one of the category names. This means the Arcle Order doesn't have
an eect on the secon list page itself (which contains no arcles),
but on the next page.
Show a Feed Link Only important if you use news feeds on the site.
Parameters (Component)
These sengs apply to the arcles your visitor arrives at through this overview page. The


opons are exactly the same you as the ones you can set in the general preferences for
arcles (Arcle Manager | Parameters, see Tweaking the details: Changing arcle sengs in
Chapter 6). Here you can depart from the general sengs for the arcles and make dierent
choices for this parcular secon or category.
Parameters (System)
The Parameters (System) mainly give you some more control over the display of list pages.
Page Title The page tle that appears above the page content. You can use this
to add an appropriate tle for your secon/category page. If you
don't ll this in, Joomla! displays the name of the menu link that
points to this page as the page tle.
Show Page Title Set this to Hide if you don't want the secon list page to have a
Page Title.
Page Class Sux This is only important if you want to get more control over the page
design (such as font size and colors). Using the Page Class Sux, you
add a sux to the name of all CSS styles used on this page. You can
read more about CSS in Chapter 11 on templates.
Menu Image Should an image be shown in the Main Menu link next to the Home
link? You can use menu images to make the menu more aracve
and easier to read. You can, for example, have a 'house' icon next to
the Home link.
SSL Enabled Only important if you are using Secure Sockets Layer (SSL), a protocol
for secure Web pages.
Download at Wow! eBook
WWW.WOWEBOOK.COM
Chapter 7
[ 189 ]
Using Category Lists
The Category List Layout is very similar to the Secon List Layout. It's a simple list, too, in this
case as it features the tles of all the arcles in a category. A Filter box (search box) makes it
easier to nd content should the list of tles be very long.

The Category List parameters give you some control over the list presentaon.
Parameters (Basic)
The Parameters (Basic) allow you to set, in some detail, what you want to be displayed on
the category page.
Category
Choose the category you want to show.
# Links From the drop-down box, select the number of links to arcles you want to
display in the list.
Table Headings
Select Hide to hide the column headers (Arcle Title, Author, and so on)
above the table.
Date Column
Do you want to show or hide the Date Column (with publicaon dates)?
Date format
By default, Joomla! displays the date as in the following example:
Wednesday, 19 August 2010. If you want to format the date dierently,
enter a date format code here. For example, entering the code %Y-%m-%d
will change the arcle date format to 2010-09-19. To nd out which codes
are allowed, check />strftime.php.
Download at Wow! eBook
WWW.WOWEBOOK.COM
Welcoming Your Visitors: Creang Aracve Home Pages and Overview Pages
[ 190 ]
Filter In a long list of categories (more than a few dozen) it's useful to set Filter to
Show. The lter gives the visitor the possibility to search the list by entering
a keyword in the Filter box.
Filter Field By default, the Filter box allows visitors to search by tle. If you wish, you
can specify that the search lter works by author name or number of hits.
Parameters (Advanced)
The Parameters (Advanced) give you some control over the order of list items and the

appearance of the list page.
Primary Order Select the order in which the arcles are displayed: by date,
alphabecally, and so on. By default, the items are in the same
order that they have in the Arcle Manager.
Paginaon Select Show to show Previous and Next navigaon links if
the secon consists of a very long category list that doesn't
t one page.
Display Select Select Show to display a select box allowing the visitor to choose
how many items they want to see on the page. This opon turned
on by default, but it's only useful if the list contains at least a few
dozen hyperlinks.
Show a Feed Link Important only if you use news feeds on the site.
Download at Wow! eBook
WWW.WOWEBOOK.COM
Chapter 7
[ 191 ]
The Parameters (Component) and the Parameters (System) of the Secon List
Layout are idencal to those of the Category List Layout. To see the Secon List
opons, have a look at the previous secon on Category Lists.
Pop quiz – test your knowledge of home pages and overview pages
1. How can you change the arrangement of items on your home page?
a. By adding new content in the Front Page Manager.
b. By changing the Main Menu Home link sengs.
c. By selecng 'Display on Front Page' in the Arcle editor.
2. How do you create an overview page?
a. By adding a new arcle in the Arcle Manager.
b. By adding a new secon or category.
c. By adding a new menu link to point to a secon or category.
3. In what cases would you choose to present content in a Blog Layout?
a. Blog Layout is used strictly for web logs.

b. You use Blog Layout to show a row of arcle tles.
c. You use Blog Layout to show teaser texts or full arcles.
Summary
In this chapter, you've learned all about two types of pages that Joomla! uses to draw the
visitor towards the actual content of your site: home pages and overview pages.
 When you want to set the layout and arrangement of the Front Page contents, you
change the sengs of the Main Menu Home link. These allow you to determine how
many introductory arcle texts the home page shows, and how they are laid out.
 When you want a completely dierent home page, you can choose not to use
the Front Page sengs. You can set any Main Menu item to be the default home
page contents.
 To show your visi tor the contents of a secon or category, you'll create menu links
to secon and category overview pages. These provide an intermediate level
between the home page and content pages; they're like "second level home pages".
Download at Wow! eBook
WWW.WOWEBOOK.COM
Welcoming Your Visitors: Creang Aracve Home Pages and Overview Pages
[ 192 ]
 There are two main formats for overview pages, Blog Layout and List Layout.
 The Blog Layout is more versale and is focused on content. It provides a taste of the
arcle content. Its purpose is to lure casual surfers.
 The List Layout is focused on organizaon. It shows how secons or categories are
structured. It helps visitors quickly scan or search for arcle tles on sites with lots
of related content (such as elaborate FAQ secons, or large numbers of arcles in a
secon with product reviews). This layout enables visitors to nd informaon quickly
in long lists of items.
In the previous chapter, you've created content; in this chapter, you've focused on presenng
that content (through the home page and overview pages). In the next chapter, you'll master
another crical aspect of web design: creang great navigaon. You'll learn how to design
menus that guide your visitors and help them to easily nd what they're looking for.

Download at Wow! eBook
WWW.WOWEBOOK.COM
8
Helping Your Visitors Find What They
Want: Managing Menus
Menus and content in Joomla! are closely intertwined. In the previous chapters,
you have seen that menu links don't just point to exisng pages, as you might
expect if you have experience building websites the old fashioned way. When
adding a menu link, you don't just tell Joomla! what page the menu link should
point to, but you rather instruct it to make that page. When adding content to
your site in previous chapters, you've seen how this works. By creang menu
links, you created dierent types of pages.
However, to your visitor, Joomla! menus are no dierent from other website
menus. To your visitor, menus should provide an easy means of navigaon.
In this chapter, we'll concentrate on menus as a means to navigate. We'll
focus on how you can make and tweak menus to design clear and intuive
navigaon, and also on how you can help the visitors nd what they want
without diculty.
Up to now, you've added menu links using mainly the default sengs. Let's nd
out how we can enhance menus and improve the navigability of the site.
This is what you'll learn:
 Adding a new menu
 Creang submenus
 Adjusng menu module sengs
 Creang hyperlinks in arcle texts
Download at Wow! eBook
WWW.WOWEBOOK.COM
Helping Your Visitors Find What They Want: Managing Menus
[ 194 ]
How many menus can you have?

On any Joomla! website you can create as many menus as you want. The default sample
site that you installed in Chapter 2 is a good example as it contains no fewer than six menus.
On the home page four of those are shown: the horizontal Top Menu, the Main Menu, the
Resources Menu, and the Key Concepts Menu. In the backend, all of the menus are listed in
the Menu Manager (Menus | Menu Manager).
At least one menu, the Main Menu, is needed for Joomla! to funcon properly. The
other ones, such as the Top Menu (the top horizontal menu) and the User Menu (a menu
that's only visible aer users have logged in), are only there to showcase Joomla!'s menu
possibilies. In real life you'll probably just confuse your visitors with that amount of
navigaon opons popping up on dierent pages and places.
However, it's great to be able to create as many menus as you like. This allows you to set
up dierent menus for dierent funcons and dierent users. You can have a main menu
(at the top of the page) containing primary links, and another menu (somewhere down the
page) containing secondary links. You might also want to have a special menu with acon
links (such as Login, and Register) and another menu that's only shown to visitors who have
logged in.
Download at Wow! eBook
WWW.WOWEBOOK.COM
Chapter 8
[ 195 ]
Menus are modules (and why that's important)
You've already seen some examples of modules in acon, such as the Poll
module. Remember, modules are Joomla!'s magic building blocks that can
contain all kinds of funconality. Menus are modules too. In fact, every new
menu you add is a new instance of the mod_mainmenu module. This makes
menus very exible. Not only can you have as many menus (menu modules) on
your site as you like, but you can also tell Joomla! exactly where (on what part
of the screen, in which module posion) and when (on which specic pages, for
which specic users) you want these menus to show up.
Sounds confusing? Don't worry, we'll pracce adding and customizing menus in

this chapter—and once you get the hang of it, you'll really appreciate Joomla!'s
amazing menu exibility.
Creating user-friendly navigation: Cleaning up the
Main Menu
When building a site, you'll start by adding links to the Main Menu. It's the mandatory menu
that is always part of the Joomla! installaon, even if you don't install sample data. But as
your site evolves, it can become a long and cluered list of hyperlinks. Even the menu of our
SRUP example site already contains eight links. When you nd the Main Menu gets long and
messy, what opons do you have to improve site navigaon?
Option 1: Change the order of menu items
By default, a new menu item is added to the end of the exisng menu. If you were to add a
new link called New Menu Item, it would show up at the boom:
In our example site we've haven't paid much aenon to menu item order. However, the
order in which you add items isn't necessarily the order in which you want them to be
displayed to your visitor.
Download at Wow! eBook
WWW.WOWEBOOK.COM
Helping Your Visitors Find What They Want: Managing Menus
[ 196 ]
Time for action – change menu item order
On the SRUP example site main menu there are eight menu items (as you've just seen in the
previous screenshot). Let's move things around to present the links in a more logical order.
The items that we want to get most aenon should be in the top half of the menu; links to
less important or stac content should be placed down below.
1. Navigate to Menus | Main Menu.
2. In the Order column, enter numbers to reect the desired order of menu items.
3. Click on the lile disc icon on the top row of the Order column to apply the
new order.
What just happened?
The menu items now show up in the order that you've chosen. News and Who are SRUP?

have been moved up from their humble posion. On the frontend you can see that the order
of items has changed:
Download at Wow! eBook
WWW.WOWEBOOK.COM

×