can you be more specific of what you are trying to do? Because its not totally clear about what you are asking.
Is the url a link to a media file in Umbraco? If so then you can use media pickers to pick a file from the media section and render the url into the razor code.
I have a landing page with different URL source codes. Depending on the source code, the above razor file has to choose a different path as the destination of "man" hyperlink. So, my point is how to change dynamically the path of href. Does that make sense or you need some more clarification?
Thank you
Okay, do not get confused with source code. I just want to change the href path by code. In that case, the content in Umbraco should include a variable, something like
Hello <a href="myPath"> man </a>
and the value of myPath should be defined on code. As simple as that.
Change the content of a data type dynamically
Inside my Razor file I am using:
as to get and display the content of
myText
property. The actual content ofmyText
which is a Textstring, is:I want , somehow, to change on the fly, the content of href by adding a string parameter when calling
myText
from Razor. Is that possible and how?Hi Illias,
can you be more specific of what you are trying to do? Because its not totally clear about what you are asking.
Is the url a link to a media file in Umbraco? If so then you can use media pickers to pick a file from the media section and render the url into the razor code.
/Michaël
I have a landing page with different URL source codes. Depending on the source code, the above razor file has to choose a different path as the destination of "man" hyperlink. So, my point is how to change dynamically the path of href. Does that make sense or you need some more clarification? Thank you
Illias,
by source code you mean template I guess? Do you have some printscreens about your setup?
/Michaël
Okay, do not get confused with source code. I just want to change the href path by code. In that case, the content in Umbraco should include a variable, something like
and the value of myPath should be defined on code. As simple as that.
is working on a reply...