-
url field
Hi there,
Is this a feature request? May be.
I'd like to be able to insert a text which will be a link in the field type URL. Now the link itself is displayed, including the 'http://'. I would like to have either a standard text, like 'More information', or an option to give another text, like 'Go to the Acme inc. website'.
Is there a possibility to insert a standard text ('More information') in the Catalog right now?
Thanks in advance,
Just
-
Re: url field
This is not included, but you can make a custom template (catalog_xxx.tpl) to write out your own "stuff" for each data entry. In this case you can write out your own text.
Remember that in your case, you want the URL to receive 2 entries, so in TL standard way of doing it, you would simply create 2 fields, e.g.
link_url
link_title
There isn't a standard widget control in TL to enter BOTH the URL and the Title in 1 line. TL does it in other places (CE hyperlink) using a multiple amount of fields and combining them together to form a single display output -- which is exactly what you will have to do.
Then in your template you merge them into a single display value.
You will always have to get your feet wet with coding, there is just no way around it. The catalog is way to generic to fit every database design.
-
Re: url field
Great! Thanks Thyon.
I just had to tweak the code a little:
Ciao,
Just
-
Re: url field
yeah, I get a bit rusty on the template code
you can also use ['raw'] if there is a problem with FE display formatting, especially if you already selected the link_url as a link, which will make ['value'] have a url wrapper already.