I've always tried to use the helper Umbraco.Field when rendering properties from nodes, however there seems to be an issue when using Umbraco.Field(currentPage, fieldAlias), it does not parse out the locallink urls. It works fine if I use it on the current node using Umbraco.Field(fieldAlias).
Work-around for this is to use GetValue and that seems to work fine, but I always thought Umbraco.Field was the preferred approach? Or am I wrong?
If Umbraco.Field(fieldAlias) works, but Umbraco.Field(currentPage, fieldAlias) doesn't it might be a bug and you can report it at http://issues.umbraco.org/dashboard#newissue=yes (first search if it already exists).
I think Umbraco.Field was created for and easier transition from the umbraco:item which was used in UserControls. I prefer to use Model.Content.GetValue because I have extension methods for Model.Content so I can use the same object everywhere.
Umbraco.Field does not parse locallink - v6.1.6
Hi all
I've always tried to use the helper Umbraco.Field when rendering properties from nodes, however there seems to be an issue when using Umbraco.Field(currentPage, fieldAlias), it does not parse out the locallink urls. It works fine if I use it on the current node using Umbraco.Field(fieldAlias).
Work-around for this is to use GetValue and that seems to work fine, but I always thought Umbraco.Field was the preferred approach? Or am I wrong?
Thanks
Kev
Hello,
If Umbraco.Field(fieldAlias) works, but Umbraco.Field(currentPage, fieldAlias) doesn't it might be a bug and you can report it at http://issues.umbraco.org/dashboard#newissue=yes (first search if it already exists).
I think Umbraco.Field was created for and easier transition from the umbraco:item which was used in UserControls. I prefer to use Model.Content.GetValue because I have extension methods for Model.Content so I can use the same object everywhere.
Jeroen
This is a known bug for which there is a workaround for versions lower than 7: http://issues.umbraco.org/issue/U4-2511
Thanks for the links guys, I've used the work-around for now. Cheers
is working on a reply...