Route

Description

The route content type allows to generate urls for custom entities. Have a look at RouteBundle to see how to implement routing for your custom entity.

Note

The route content type should not be used on page templates. For pages, use the Resource locator content type instead.

Parameters

Parameter

Type

Description

mode

string

Defines the mode of the input field, can either be “full” or “leaf”. Default value is “leaf”.

Example

<property name="title" type="text_line">
    <tag name="sulu.rlp.part"/>
</property>

<property name="subtitle" type="text_line">
    <tag name="sulu.rlp.part"/>
</property>

<property name="routePath" type="route">
    <meta>
        <title lang="en">Resource locator</title>
    </meta>

    <params>
        <param name="mode" value="full"/>
    </params>
</property>

Twig

You need to use the sulu_content_path twig extension to render the full url.

{{ sulu_content_path(content.routePath) }}