Navigation

  • index
  • next |
  • previous |
  • Sulu 2.5 documentation »
  • Reference »
  • Content Type Reference »
  • Link

Link¶

Description¶

The link content type allows to select different type of links, including links to internal entities like pages and external URLs. The content type can be limited to allow only specific link types and configured to show an anchor and a target field.

The link content type can be extended with additional link types by implementing a custom LinkProvider service.

Parameters¶

Parameter

Type

Description

enable_anchor

bool

Enables the anchor input field in the overlay. Default: false

enable_attributes

bool

Enables the target, title and rel input fields in the overlay. Default: false

enable_query

bool

Enables the query input field in the overlay. Default: false

types

collection

List of available types in the dropdown. Default: All registered link types

excluded_types

collection

List of types that should be excluded in the dropdown. Default: empty array

Example¶

<property name="link" type="link">
    <meta>
        <title lang="en">Link</title>
        <title lang="de">Link</title>
    </meta>
</property>

Twig¶

<a href="{{ content.link }}">Click me</a>

Complex Example¶

<property name="link" type="link">
    <meta>
        <title lang="en">Link</title>
        <title lang="de">Link</title>
    </meta>

    <params>
        <param name="enable_anchor" value="true"/>
        <param name="enable_attributes" value="true"/>
        <param name="types" type="collection">
            <param name="page"/>
            <param name="external"/>
            <param name="media"/>
        </param>
    </params>
</property>

Complex Twig¶

<a href="{{ content.link }}" target="{{ view.link.target }}" rel="{{ view.link.rel }}">
    {{ view.link.title }}
</a>

Logo

Table of Contents

  • The Book
  • Cookbook
  • Reference
    • System Requirements for Running Sulu
    • Content Type Reference
      • Account selection
      • Block
      • Category selection
      • Checkbox
      • Collection selection
      • Color
      • Contact account selection
      • Contact selection
      • Date
      • Datetime
      • Email
      • ImageMap
      • Link
      • Location
      • Media selection
      • Number
      • Page Selection
      • Phone
      • Resource locator
      • Route
      • Select
      • Single Account selection
      • Single Category selection
      • Single Collection selection
      • Single Contact selection
      • Single Media selection
      • Single page selection
      • Single Select
      • Single Snippet Selection
      • Smart content
      • Snippet Selection
      • Tag Selection
      • Teaser Selection
      • Text area
      • Text editor
      • Text line
      • Time
      • URL
    • Twig Extensions
    • Document Manager
    • Glossary
  • Bundles
  • Developer Guide
  • Upgrades

Related Topics

  • Documentation overview
    • Reference
      • Content Type Reference
        • Previous:
          ImageMap
        • Next:
          Location

This Page

  • Show Source

Quick search

Navigation

  • index
  • next |
  • previous |
  • Sulu 2.5 documentation »
  • Reference »
  • Content Type Reference »
  • Link