J4.x

Premiers pas : Ajout d'un module

From Joomla! Documentation

Revision as of 09:30, 3 December 2022 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎français • ‎português do Brasil • ‎日本語

Introduction

Les modules sont de petites extensions utilisées à des fins particulières. Ils sont parfois liés à d'autres éléments de contenu. Par exemple, un module Menu est nécessaire pour afficher les éléments de menu utilisés pour naviguer sur le site. Parfois, ils ne sont pas du tout liés à d'autres contenus. Le contenu des modules est généralement affiché dans des cases situées au-dessus, à côté ou en dessous du contenu de la page principale. En outre, les modules peuvent être affichés sur certaines pages mais pas sur d'autres, et pour certaines personnes mais pas pour d'autres.

La liste des modules du site

Il est intéressant de regarder la liste des Modules (Site). Sélectionnez Contenu  Modules du site dans le menu Administrateur. Vous verrez que les modules fil d'ariane, Menu Principal et Formulaire de connexion sont listés. Les titres des colonnes sont les suivants :

  • Checkbox. Select or Deselect all visible items in the list.
  • Order Symbol. After selection, used to drag modules up or down to change their order in their assigned positions.
  • Status. Published or Unpublished controls whether a module will be seen at all.
  • Title. Select a Title link to edit the module.
  • Position. This is the position defined in the template. The obvious positions are breadcrumbs and sidebar-right. There are many more.
  • Type. The type of module is given because it may not be obvious from the Title.
  • Pages. On All Pages is obvious. It may be On Selected Pages or Not on Selected Pages.
  • Access. Public means everyone. But this may be restricted by User Group, for example Super User.
  • ID. An identification number allocated by Joomla.

Add a New Module

A good module to practice with is the Custom module. It is used to display arbitrary content such as a message or announcement.

  • Select the New button in the Tool bar. This opens a list of available Site modules.
  • Select the Custom module. This opens the module in the Edit form.
  • Enter a Title, for example Announcement.
  • Enter the Module text, for example This site is closing for a software update at 20:00 on Friday.
  • Select a Position from the drop-down list. In this case it will be Sidebar-right along with the other modules.
  • Set a Finish Publishing date. This is optional but an obvious thing to do to make the module disappear after the event announced has passed.
  • Save and Close. Reload the Site and see the result. Is it in the order you want? If not:
    • In the Modules list select the Order Symbol in the column headings.
    • Hover on the grab handle symbol for the new module and then select and drag it up or down to the required position. Note that selecting a column head symbol toggles the order so select as required and drag as required.

If you want another Custom module with another message go ahead and create a New Custom module. You can have as many as you like with different titles.