[link:] Short Tag
Built-in Feature
This short tag is used to create a link inside your post content using any URL-type custom field defined.
Note: the
[link:]
generates inline text (<a href="">...</a>
) and can appear anywhere (inside a paragraph, table, etc.)Syntax Breakdown
[link:
Field Code [ :Link Class
] ]
Link Text [/link]
- Field Code: code of the URL-type custom field you want to use as destination URL of the link.
- Link Class: optional class applied to the link/anchor element
- Link Text: string displayed by the link
Samples
[link:product_url]Go to product page[/link]
[link:url_field:.btn.btn-info]Click me![/link]
:.btn.btn-info
are standard Bootstrap CSS styles to style the link as a button.
Adding your own CSS classes to style the link
You can use any method described in How to add custom CSS to define such extra CSS classes.
Recursion
If you are using fields in a Content Block, you can control the level at which they are resolved by using [-link:...]
, [--link:...]
etc. Each -
pushes the resolution up one level to the caller.