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

Thiết kế web với joomla 1.6(5).x part 42 pdf

8 105 0
Tài liệu đã được kiểm tra trùng lặp

Đ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 8
Dung lượng 1,36 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

To do so, go to the Extensions menu and select the Module Manager option.. Set the Menu Assignment to specify the pages upon which the module will appear.. The Module parameters section

Trang 1

l Greeting: Controls whether the system uses a greeting for users upon login The default is

Yes, which results in the greeting being printed in the module position after login The default greeting is “Hi, username.”

l Name/Username: This control determined whether the greeting shows the username or the

real name of the user This control is only relevant if the Greeting parameter is set to yes

l Encrypt Login Form: If the value Yes is selected, the system will encrypt the form using

SSL The default value is No

Warning

Do not select the option to Encrypt Login Form unless your site is SSL-enabled and URLs with the https://

prefix are accessible.

To add a Login module to your site, follow these steps:

1 Access the Module Manager To do so, go to the Extensions menu and select the

Module Manager option The Module Manager loads in your web browser.

2 Click the New icon on the toolbar at the top of the Module Manager The New

Module dialogue opens Refer to Figure 17.2

3 Select the option Login and then click the Next button The Login Module dialogue

loads in your browser

4 In the Title field, type a name for the module This field is required.

5 Set the option Enabled to Yes.

6 Set the Position control to assign the module to a position on the page.

7 Set the Menu Assignment to specify the pages upon which the module will appear.

8 Select any additional options or parameters you wish; all other fields are optional.

9 Click the Save icon on the toolbar at the top right to save your new module The

sys-tem creates the module, closes the dialogue, and returns you to the Module Manager

Cross-Reference

More detailed information about creating user registration functionality can be found in Chapter 10.

The Menu modules

The Menu modules play a key role in the system and are closely tied to the Menu Manager Each menu in the system has its own module The Menu Modules are automatically created by the sys-tem each time a menu is created in the Menu Manager A typical Menu module output is shown in

Trang 2

FIGURE 17.20

The front-end output of the Menu module This example shows the default Main menu assigned to the Left module position

Menu

module

Though the menu module’s main purpose is to control menu placement, visibility, and access, it also impacts certain aspects of the menu’s appearance The parameters include a number of options for assisting in the styling of the menu, as shown in Figure 17.21

In the default system with the sample data installed, you find six menu modules named: Main menu, Resources, Key Concepts, User Menu, Example Pages and Top Menu All of the default modules are assigned to the left module position, except for the top menu, which is assigned to the User3 position

Note

The system name for this module type is mod_mainmenu.

The Parameters section of the Menu module is one of the most complicated module interfaces The workspace is divided into three sections: Module parameters, Advanced parameters, and Other parameters

Trang 3

FIGURE 17.21

The Menu module parameters

The Module parameters section contains the following options:

l Menu name: Select the menu you want to control from the combo box.

l Menu style: Select the formatting for the menu the menu layout The default style is

List, but other options include Legacy - Vertical, Legacy - Horizontal, and Legacy - Flat List

l Start Level: This control is used in conjunction with the End Level control to turn one

menu into multiple menus by separating the menu items into hierarchical groupings This

is optional and if you do not intend to separate your menu items into multiple menus, then set the value for this control (and the End Level control as well) to zero This item has no impact where the menu uses a flat hierarchy

l End Level: This control is used in conjunction with the Start Level control to turn one

Trang 4

l Always show submenu items: This control sets the visibility of submenu items Set this

control to Yes to display all submenu items, even when the parent item is not selected The default setting is No This control has no impact if there are no submenu items

l Target position: This field allows you to specify the placement of any drop-down or

pop-up submenus This is an optional field and has a particular syntax that must be followed

A proper entry for this field will specify the position of the submenu in terms of position and size, for example, top=20,left=20,width=100,height=200

Note

The menu style options include three Legacy modes These Legacy options are intended primarily for site owners who are upgrading to Joomla 1.5.x from the old Joomla 1.x The Legacy styles are intended to help you keep your pre-Joomla 1.5 formatting and they use different CSS classes than the default Joomla 1.5.x menus The default style, List, is specifically intended for Joomla 1.5.x sites and is employed by all the menus in the default installation.

The Advanced parameters section contains the following:

l Show whitespace: Setting this option to No results in the code relating to the menu to

com-press through the elimination of unnecessary whitespace in the code Setting the option to Yes keeps the whitespace in place, which renders the code easier to read Setting this option

to Yes while in development is helpful; set it to No for a live site to improve performance

l Caching: This control allows you to exempt a specific module from the site’s caching, as

set in the Global Configuration Select the No Caching option to prevent the contents of this module from being cached The default setting is Use Global

l Menu Tag ID: Set an integer value in this field and it will be appended to the UL tag for

this menu This enables you to create unique styling for the Menu UL tag

l Menu class suffix: This field allows you to specify a suffix that will be automatically

appended to all CSS styles that affect this menu The use of a specified suffix makes it pos-sible for you to style this menu individually

l Module class suffix: This field allows you to specify a suffix that will be automatically

appended to all CSS styles that affect this module The use of a specified suffix makes it possible for you to style this module individually

l Maximum menu depth: Set an integer value in this field to control the maximum number

of levels the menu can have The default value is 10

Cross-Reference

I discuss the formatting of menus and the creation of submenus in Chapter 8.

The Other Parameters section contains the following:

l Show menu images: Set to Yes if you want to show images for the menu items This

con-trol is the trigger for the Image options that follow in this section

l Menu image alignment: Select to align the images to the left or the right This option is

Trang 5

l Menu image link: Set to Yes to have the image itself function as a link to the item This

option is dependent upon the Show Menu Images control being set to Yes

l Expand menu: Set this control to Yes to show submenu items expanded.

l Activate parent: Set this control to Yes to make the parent items active whenever the

child item is active

l Full active highlighting: Set this control to Yes to make all parts of the full menu item

active

l Indent image: Use this control to specify what indent image, if any is used The default

setting is template, meaning the system should use the indent items specified by the tem-plate Set to the option Joomla! default images to use the system defaults rather than the template images Setting the control to None results in no indent images being used The final option, Use Parameters below, activates the following six Indent Image controls

l Indent Image 1-6: When the Indent Image parameter is set to Use Parameters below, this

control is active Use it to select the image to be used for the first level of indentation

l Spacer: Use this field to specify a character to be used for the spacer between horizontal

menu items

l End spacer: Use this field to specify a character to be used for the spacer at the end of the

horizontal menu

To add a Menu module to your site, follow these steps:

1 Log in to the admin system of your site.

2 Go to Extensions menu and select the Module Manager option The Module Manager

loads in your browser

3 Click the New icon on the toolbar at the top of the Module Manager The New

Module dialogue opens Refer to Figure 17.2

4 Select the Menu option and then click the Next button The Menu Module dialogue

loads in your browser

5 In the Title field, type a name for the module This field is required.

6 Set the option enabled to Yes.

7 Set the Position control to assign the module to a position on the page.

8 Set the Menu Assignment to specify the pages upon which the module will appear.

9 Select the name of the menu you wish to control from Menu Name combo box

under Module parameters.

10 Select any additional options or parameters you wish; all other fields are optional.

Trang 6

The menu modules are among the most important in the system Fluency in menu styling requires an awareness

of not only the parameters, but also the underlying CSS styles that affect the menus Tools like Firebug or the Web Developer Toolbar for the Firefox browser can make the task of styling menus much easier by exposing the styling and making it easy to identify exactly which styles impact which items You can download the Firebug or Web Developer extensions from

http://addons.mozilla.org

Most Read Content module

The Most Read Content module allows you to place on the page a list of the most popular articles

on the site, as judged by the number of views the article has received The module displays a list of the items with links to the pages, as shown in Figure 17.22

In the default installation with the sample data installed there is one Most Read Content Modules;

it is named Popular and is assigned to various pages in the User2 module position

FIGURE 17.22

The front-end output of the Most Read Content module; in this case the module named Popular in the default installation, shown here assigned to the User3 module position on the front page

Most Read Content module

Trang 7

The Parameters section is divided into two sections: Module parameters and Advanced parameters Figure 17.23 shows the Module parameters

Note

The system name for this module type is mod_mostread.

The Module parameters section contains the following controls:

l Module class suffix: This field allows you to specify a suffix that will be automatically

appended to all CSS styles that affect this module The use of a specified suffix makes it possible for you to style this module individually

l Front page articles: Determines whether the front page articles are included in the list.

l Count: Specify an integer value to control the number of items displayed by this module

The default value is 5

l Category ID: Enter a Category’s ID number to limit the display to articles of a particular

category You can list multiple Category IDs, separating them with commas

l Section ID: Enter a section’s ID number to limit the display to articles of a particular

sec-tion You can list multiple Section IDs, separating them with commas

FIGURE 17.23

The Most Read Content module parameters

Trang 8

To find a section’s ID number, view the section in the Section Manager To find a category’s ID number, view the category in the Category Manager In both cases the ID number appears in the far right column, under the column heading ID.

The Advanced parameters section contains caching options:

l Caching: This control allows you to exempt a specific module from the site’s caching, as

set in the Global Configuration Select the option No Caching to prevent the contents of this Module from being cached The default setting is Use Global

l Cache Time: The time, in minutes, you want the contents to be cached Enter an integer

value here The default value is 900 minutes, meaning that after 900 minutes the system will re-create, or refresh this module Note this control is only meaningful if the caching for the module is enabled

To add a Most Read Content module to your site, follow these steps:

1 Log in to the admin system of your site.

2 Go to the Extensions menu and select the Module Manager option The Module

Manager loads in your browser

3 Click the New icon on the toolbar at the top of the Module Manager The New

Module dialogue opens Refer to Figure 17.2

4 Select the option Most Read Content and then click the Next button The Most Read

Content Module dialogue loads in your browser

5 In the Title field, type a name for the module This is a required field.

6 Set the option called Enabled to the value Yes.

7 Set the Position control to assign the module to a position on the page.

8 Set the Menu Assignment to specify the pages upon which the module will appear.

9 Select any additional options or parameters you wish; all other fields are optional.

10 Click the Save icon on the toolbar at the top right to save your new module The

sys-tem creates the module, close the dialogue and return you to the Module Manager

Tip

You can create multiple instances of this module type then use the Category ID and Section ID to create mod-ules to display the most popular items in each of the various sections of your site.

Newsflash

The Newsflash module provides a way for you to insert into a module position a fixed or rotating content item The content displayed can be drawn from either a dedicated category or from existing

Ngày đăng: 04/07/2014, 06:20

TỪ KHÓA LIÊN QUAN