URL¶
Description¶
Shows a text line, the inserted content will be validated against an URL regex and saved as a simple string.
Parameters¶
Parameter |
Type |
Description |
---|---|---|
defaults |
collection |
Default values for input (scheme and specificPart). |
schemes |
collection |
List of available schemes in dropdown and validation.
Defaults are: |
Example¶
<property name="url" type="url">
<meta>
<title lang="en">URL</title>
</meta>
</property>
Extended Example¶
<property name="url" type="url">
<meta>
<title lang="en">URL</title>
</meta>
<params>
<param name="defaults" type="collection">
<param name="scheme" value="http://"/>
<param name="specific_part" value="www.google.at"/>
</param>
<param name="schemes" type="collection">
<param name="http://"/>
<param name="https://"/>
</param>
</params>
</property>
Twig¶
The content type returns the full url which can be rendered directly:
<a href="{{ content.url }}">
{{ content.url }}
</a>