Astuces de composition

  • Les adresses de pages web et de messagerie électronique sont transformées en liens automatiquement.
  • Tags HTML autorisés : <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

    Ce site autorise le contenu HTML. Alors qu'appendre tout l'HTML pourrait intimider, apprendre à utiliser un nombre très restreint des "balises" HTML les plus basiques est très facile. Ce tableau fournit des exemples pour chaque balise qui est autorisée sur ce site.

    Pour plus d'information voir les spécifications HTML du W3C ou utilisez votre moteur de recherche préféré pour trouver d'autres sites qui expliquent le code HTML.

    Description de la baliseVous entrezVous obtenez
    Les ancres sont utilisées pour établir des liens vers d'autres pages.<a href="http://www.kolossaldrupal.org">Je m'empale avec Drupal™</a>Je m'empale avec Drupal™
    Accentué<em>Accentué</em>Accentué
    Fort<strong>Fort</strong>Fort
    Citation<cite>Citation</cite>Citation
    Text codé pour afficher du code de programmation<code>Codé</code>Codé
    Liste non ordonnée - utilisez <li> pour débuter chaque élément de la liste<ul> <li>Premier élément</li> <li>Second élément</li> </ul>
    • Premier élément
    • Second élément
    Liste ordonnée - utilisez <li> pour débuter chaque élément de la liste<ol> <li>Premier élément</li> <li>Second élément</li> </ol>
    1. Premier élément
    2. Second élément
    Les listes de définition sont similaires aux autres listes HTML. <dl> délimite la liste de définitions, <dt> délimite le terme à définir <dd> délimite la définition proprement dite.<dl> <dt>Premier terme</dt> <dd>Première définition</dd> <dt>Second terme</dt> <dd>Seconde définition</dd> </dl>
    Premier terme
    Première définition
    Second terme
    Seconde définition

    La plupart des caractères non usuels peuvent être entrés sans problème.

    Si vous rencontrez des problèmes, essayez d'utiliser les entités HTML. Un exemple courant est &amp; pour le et commercial &. Pour une liste complète des entités voyez la page entités HTML du W3C. Voici quelques caractères disponibles :

    Description du caractèreVous entrezVous obtenez
    Et commercial&amp;&
    Supérieur&gt;>
    Inférieur&lt;<
    Marque de citation&quot;"
  • Les lignes et les paragraphes sont reconnus automatiquement. Les balises <br /> saut de ligne, <p> paragraphe et </p> fin de paragraphe sont insérées automatiquement.Si les paragraphes ne sont pas reconnus ajoutez simplement quelques lignes vides.
  • Syntax highlighting of source code can be enabled with the following tags:

    • Generic syntax highlighting tags: "<code>", "<blockcode>", "<css>", "<php>", "<html>", "<ccss>".
    • Language specific syntax highlighting tags: "<ccss>" for CSS source code, "<drupal5>" for Drupal 5 source code, "<drupal6>" for Drupal 6 source code, "<html>" for HTML source code, "<javascript>" for Javascript source code, "<php>" for PHP source code.

    Options and tips:

    • The language for the generic syntax highlighting tags can be specified with one of the attribute(s): type, lang, language. The possible values are: "ccss" (for CSS), "css" (for CSS), "drupal5" (for Drupal 5), "drupal6" (for Drupal 6), "html" (for HTML), "html4strict" (for HTML), "javascript" (for Javascript), "php" (for PHP).
    • Line numbering can be enabled/disabled with the attribute "linenumbers". Possible values are: "off" for no line numbers, "normal" for normal line numbers and "fancy" for fancy line numbers (every nth line number highlighted). The start line number can be specified with the attribute "start", which implicitly enables normal line numbering. For fancy line numbering the interval for the highlighted line numbers can be specified with the attribute "fancy", which implicitly enables fancy line numbering.
    • If the source code between the tags contains a newline (e.g. immediatly after the opening tag), the highlighted source code will be displayed as a code block. Otherwise it will be displayed inline.
    • Beside the tag style "<foo>" it is also possible to use "[foo]".

    Defaults:

    • Default highlighting mode for generic syntax highlighting tags: the default language used for syntax highlighting is "php".
    • Default line numbering: no line numbers.

    Examples:

    You typeYou get
    <code>foo = "bar";</code>Inline code with the default syntax highlighting mode.
    <code>
    foo = "bar";
    baz = "foz";
    </code>
    Code block with the default syntax highlighting mode.
    <code lang="javascript" linenumbers="normal">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Javascript source code
    and normal line numbers.
    <code language="javascript" start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Javascript source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.
    <ccss>
    foo = "bar";
    baz = "foz";
    </ccss>
    Code block with syntax highlighting for CSS source code.
    <ccss start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    <ccss>
    Code block with syntax highlighting for CSS source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.
  • The Views module allows administrators to create dynamic lists of content for display in pages or blocks. It is possible to insert those lists into existing node bodies and blocks, but such inclusion requires that PHP filtering be turned on. The Insert View module allows any user to insert view listings using tag syntax, without the need for PHP execution permissions. The Insert View tag syntax for embedding a view is relatively simple:

    [view:my_view]

    is replaced by the content listing corresponding to the named view. In this case it is my_view.

    [view:my_view=my_display]

    invokes the my_view view using the my_display view display ID. If the display slot is left empty, the view's "default" display is used.

    [view:my_view=my_display=1,2,3]

    uses the my_display view display, and passes a comma delimited list of arguments (in this case 1, 2, and 3) to the view.

    Here's an example you could use with the default view named "tracker" which uses the page display and takes a user ID as an argument:

    [view:tracker=page=1]

    In short this tag says, "Insert the view named tracker, use the "page" display, and supply the argument 1."

    Sometimes you want to pass an argument without specifying a display ID. You can do that by leaving the display ID slot empty, like so:

    [view:my_view==1]

    How to find a display ID: On the edit page for the view in question, you'll find a list of displays at the left side of the control area. "Defaults" will be at the top of that list. Hover your mouse pointer over the name of the display you want to use. A URL will appear in the status bar of your browser. This is usually at the bottom of the window, in the chrome. Everything after #views-tab- is the display ID. For example in http://localhost/admin/build/views/edit/tracker?destination=node%2F51#views-tab-page the display ID would be "page".