cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Site Properties

punk
Champ in-the-making
Champ in-the-making
How can I add my own custom properties to a Share Site in order to

1) Show them into the site-profile dashlet.
2) Be able to search for these new properties.

Thanks in advance.
21 REPLIES 21

afaust
Legendary Innovator
Legendary Innovator
Hello,

have you verified that your custom data is actually submitted to the web scripts? The modified web scripts are practically identical to the ones used in our projects and they all work like a charm, so I''d expect a problem somewhere else when there are no errors reported in any logs.

Regards
Axel

francesco_forna
Confirmed Champ
Confirmed Champ
Dear mincd_evolpe,
you are able to solve your problem simply by assign site.node to a local javascript variable and use it to refer public site methods.

For example:

var yourvarname = site.node;
yourvarname.properties["stcp:siteComment"] = siteComment;
yourvarname.properties["stcp:matureOnly"] = matureOnly;
yourvarname.save();

By the way, we hadn't use the site custom properties. We had added simply a new property to st:site model. In fact, it seems that at the moment (4.0.2 EE version) the real use of custom site properties is not clear. The class Site.CustomProperty doesn't have public setter so we can't set at all custom property values during site editing, why?

Bye,
Francesco.