Share » Learn » eZ Publish » Formatting Text with the eZ Publish...

Formatting Text with the eZ Publish Online Editor

Friday 22 June 2007 6:00:00 am

  • Currently 3 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Adding hyperlinks in your content improves the experience for site visitors. The link feature in the OE lets you add links both to external and internal webpages. In addition, you can add links within a single page (these are called anchors) so that visitors can jump back and forth without having to scroll and search for information.

Hyperlinks

The Link button is used to create and edit hyperlinks. This button is located in the Special Tools area of the OE toolbar. To create a new link, position the cursor at a location where you wish to add a hyperlink, then click the Link button. You can also right-click and select "Insert link" from the context-sensitive pop-up menu. This will open a modal dialog called "Insert link" with the link properties Text, Type, URL, Class, Open in new window, Title, and ID. There are five possible protocol prefixes for external links (http, mailto, file, ftp, and https) and two special types for internal links (ezobject and eznode). The internal links will be created dynamically based on the object or node ID numbers. In other words, if a node is moved, links that point to it will not be broken even though its URL has changed. Specify the link properties and click the OK button. The inserted link will appear in the OE text area.

You can also select some text and click the Link button. Alternatively, right-click some selected text and choose the "Insert link" item from the context-sensitive pop-up menu. The dialog that was described above will appear and the Text field will contain the selected text fragment.

Anchors

A hyperlink can refer not only to a whole document but also to a specific section within a document. Anchors are used for linking to a specific section of a page. The Anchor button is located in the Special Tools area of the OE toolbar. Note that the anchor names must be unique within the same page / document / object. You need to mark the section before you can link to it. To do this, insert an anchor at the beginning of the desired fragment. When creating a hyperlink referring to this fragment, append the hash character (#) and the anchor name to the URL. For example, use "ezobject://323#Sun" or "http://ez.no/page.php#Sun" to link to an anchor called "Sun".

To create an anchor, position the cursor at a place where you wish to add an anchor, then click the Anchor button. You can also right-click this location and choose the "Insert anchor" item from the context-sensitive pop-up menu. You will see a modal dialog called "Insert anchor". Specify the anchor name and click the OK button. The inserted anchor will appear as a special icon in the OE text area.

36 542 Users on board!

Tutorial menu

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)