input-type ‘link’ does provide a link to a resource, ok.
but I want to get the id of a resource (to provide it as a parameter to getResources).
cbGetField &returnAsJSON does return the id within .link-property,
but cbGetField always returns the path instead of the id!
why does it not have [[~[[+link]]]] in template for the field instead of [[+link]] ?
it would be much more flexible! (or even a value of [[+id]] would be fine!)
so my question:
how do I let the user/editor choose a resource and return the id of this resource for further processing ?
it’s not an option to let the user/editor find the id (yes, it always shows in brackets in the resource-tree) and just enter that number!
[[+link_raw]] may also contain an email address or url if that’s what the user entered in the link field. That’s why [[+link]] returns the generated url instead of just the resource ID, as [[+link]] will always have a full url including protocols.
Alternative solutions could be to use the dropdown input in 1.5 or the third party cbResourceSelect input instead of a link.