November Happy Hour will be moved to Thursday December 5th.

Hide property based on Culture

Vote:
 

I'm working with a Globalised e-commerce site and our customer is requesting a property they only want to appear for one culture. Since the site is consisting on many languages it will be an disadvantage to have the property for all cultures. Is there a way to hide/remove the property for the rest of the cultures? The Culturespecific attribute is only making the values unique for each culture so that won't help me in this case.

//J

#155260
Sep 13, 2016 11:23
Vote:
 

By "hiding", do you mean you want to hide the property in Catalog UI, or in view mode (for end-users)?

#155264
Sep 13, 2016 11:44
Vote:
 

Hi Quan, I want to hide the property in the Catalog UI for all other cultures.

//J

#155281
Sep 13, 2016 13:12
Vote:
 

That's an interesting question, however I don't think we support that feature out-of-box.

Some partners might have developed solution for that - but that's also not what I'm aware of - I'm interested in the solution as wel - if any.

/Q

#155291
Edited, Sep 13, 2016 14:56
Vote:
 

Ok thanks for response. Yes since e-commerce is differing in different countries and regions that should be a good feature to have. For example in UK where you can exempt some products from VAT, this must be set on variant level, and become confusing for all other editors from the rest of the world in a globalized site. A wish should be to set allowed cultures on attribute level for the property.

/J

#155302
Sep 13, 2016 16:34
Vote:
 

My colleague Per showed me this: http://world.episerver.com/blogs/Kalle-Ljung/Dates/2013/10/Moving-built-in-properties-to-the-settings-header-in-EPiServer-7-CMS/ 

Perhaps you can make it work with specific language setting?

#155307
Sep 13, 2016 17:10
Vote:
 

Great thanks, will try it out.

//J

#155329
Sep 14, 2016 10:23
Vote:
 

I assume I should set the scaffoldcolumn to false to hide the property in the example above, but I can't seem to figure out how to set it. In the attribute collection I can only find TypeId for each attribute, which is an object, how do I set it? Also tried to set the Layoutclass to a css class which should hide it, but that didn't seem to work.

Any ideas?

/J

#155361
Sep 14, 2016 17:56
Vote:
 

Hi

The ExtendedMetata object, called property in the example, should have a property called .ShowForEdit. Setting that to false should hide the property in the UI.

Regards

Per Gunsarfs

#155375
Sep 15, 2016 10:43
Vote:
 

Great, that worked, thanks!

#155390
Sep 15, 2016 14:42
Vote:
 

Great, glad it solved your problem.

#155391
Sep 15, 2016 14:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.