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.

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>

    <tag name="sulu.rlp"/>
</property>

Twig

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

{{ sulu_content_path(content.routePath) }}