Have you seen the documentation for the content picker. Here you will find Razor examples on how to get the data out. There are examples on dynamic and strongly typed Razor.
I'm still kinda new to Razor, so I see that, what I've done wrong, was not adding the var in the @{} together with the link, but instead I placed it with the other var for the image.
Cant get nice url in Partial View Macroo
Hi
I'm trying to create a testimonial slider for a business site.
I've created a repository in the root of the site where testimonials can be created in, so they can be shown from any page of the site
Above you see the structure of the site
My code is as follows:
I'm picking the destination links (clientCaseLink) in a content picker, and the llink works, but it's the ID and not the nice URL being shown.
I've tried a ton of stuff, but can seem to make it work.
I guess it's some small thing that I just can't seem to figure out, so hope you guys can help me
Best Henrik
Hi Henrik,
Have you seen the documentation for the content picker. Here you will find Razor examples on how to get the data out. There are examples on dynamic and strongly typed Razor.
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/content-picker
For your example could you please try to use the code below. Something like this should work for you
Hope this helps, and can get your further.
/Dennis
Hi Dennis
Thank you very much for your help.
I'm still kinda new to Razor, so I see that, what I've done wrong, was not adding the var in the @{} together with the link, but instead I placed it with the other var for the image.
Now it made sense :)
Again. Thanks alot!
Henrik
is working on a reply...