Navigation

  • index
  • next |
  • previous |
  • Sulu 2.2 documentation »
  • Bundles »
  • MarkupBundle »

sulu-link¶

The sulu-link tag allows to link to pages and other entities in the application by their id. This id of the tag will be validated and replaced by a proper anchor tag when a response is generated.

The tag supports 2 different providers: page (default) and media. Additional provides can be implemented by registering a service with the sulu.link.provider tag.

Example¶

<sulu-link href="123-123-123" />
<sulu-link href="123-123-123" title="test-title" />
<sulu-link href="123-123-123" target="_blank">Link Text</sulu-link>
<sulu-link provider="page" href="123-123-123" target="_blank">Link Text</sulu-link>
<sulu-link provider="media" href="1" title="test-title"/>
<sulu-link provider="media" href="1">Link Text</sulu-link>

Results into:

<a href="http://example.com/test" title="Page Title">Page Title</a>
<a href="http://example.com/test" title="test-title">Page Title</a>
<a href="http://example.com/test" title="Page Title" target="_blank">Link Text</a>
<a href="http://example.com/test" title="Page Title" target="_blank">Link Text</a>
<a href="http://example.com/media/1/download/image.jpg?v=1" title="test-title">Media Title</a>
<a href="http://example.com/media/1/download/image.jpg?v=1" title="Media Title">Link Text</a>

Logo

Table of Contents

  • The Book
  • Cookbook
  • Reference
  • Bundles
    • AudienceTargetingBundle
    • CollaborationBundle
    • PageBundle
    • HashBundle
    • HttpCacheBundle
    • LocationBundle
    • MarkupBundle
      • sulu-link
    • MediaBundle
    • PersistenceBundle
    • PreviewBundle
    • RouteBundle
    • SearchBundle
    • SecurityBundle
    • WebsiteBundle
  • Developer Guide
  • Upgrades

Related Topics

  • Documentation overview
    • Bundles
      • MarkupBundle
        • Previous: MarkupBundle
        • Next: MediaBundle

This Page

  • Show Source

Quick search

Navigation

  • index
  • next |
  • previous |
  • Sulu 2.2 documentation »
  • Bundles »
  • MarkupBundle »