Navigation

  • index
  • next |
  • previous |
  • Sulu 3.x documentation »
  • Reference »
  • Property Type Reference »
  • Link

Link¶

Description¶

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

The link property 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
    • Property Type Reference
      • Account selection
      • Article selection
      • Block
      • Category selection
      • Checkbox
      • Collection selection
      • Color
      • Contact account selection
      • Contact selection
      • Date
      • Datetime
      • Email
      • ImageMap
      • Link
      • Location
      • Media selection
      • Number
      • Page Selection
      • Page Tree Route
      • Phone
      • Resource locator
      • Route
      • Select
      • Single Account selection
      • Single Article selection
      • Single Category selection
      • Single Collection selection
      • Single Contact selection
      • Single Icon 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
    • Glossary
  • Bundles
  • Developer Guide
  • Upgrades

Related Topics

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

This Page

  • Show Source

Quick search

Navigation

  • index
  • next |
  • previous |
  • Sulu 3.x documentation »
  • Reference »
  • Property Type Reference »
  • Link