Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
In web forms I get the store id using:
var _storeId = <umbraco:Item field="store" recursive="true" runat="server" />;
How do I get the id in MVC ? I tried:
var _storeId = @Umbraco.Field("store", recursive: true);
but I get nothing, I have the store picker property in my master doc type.
I am using umbraco 6.1.6 MVC and Tea 2.2.2
Hi Moran,
Good question. What you are doing there should work. It's just a property value like any other. Maybe you should try to get the node on which you know the property is, and then get the property.
/Rune
Thanks
My bad I had the store property in the "product catalog" doc type.
Ah, that could give you problems when navigating to other parts of the website. Good thing you found the solution.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting the store id
Hi
In web forms I get the store id using:
How do I get the id in MVC ? I tried:
but I get nothing, I have the store picker property in my master doc type.
I am using umbraco 6.1.6 MVC and Tea 2.2.2
Hi Moran,
Good question. What you are doing there should work. It's just a property value like any other. Maybe you should try to get the node on which you know the property is, and then get the property.
/Rune
Thanks
My bad I had the store property in the "product catalog" doc type.
Ah, that could give you problems when navigating to other parts of the website. Good thing you found the solution.
/Rune
is working on a reply...