-
Re: how to access system property on soy?
mtuljapurkar Apr 19, 2013 2:11 AM (in response to ansaxena@informatica.com)Considering that the soy template is for an Action class, you need to pass the value through the getModel() method of the Action class. Ideally, you should not be having a requirement to do this.
-
Re: how to access system property on soy?
ansaxena@informatica.com Apr 19, 2013 4:13 AM (in response to mtuljapurkar)Hi Mandar,
Thanks for the response,
If i m not wrong then for accessing multiple system properties on a single soy file we have to modifty that corresponding ActionClass and pass them on the soy as a param.
Actually i want to add my custom links in the header and assign the redirection link to them, so i thought to add one system property for that and will access that property on soy file but that didn't worked.
Thanks,
Ankit
-
Re: how to access system property on soy?
mtuljapurkar Apr 19, 2013 8:41 AM (in response to ansaxena@informatica.com)1 person found this helpfulSure you can always expose the system properties through this method.
May be there is another way to do this as well.
-
-
-
Re: how to access system property on soy?
deesteel Jun 4, 2013 2:22 PM (in response to ansaxena@informatica.com)This should work:
{getJiveProperty('<property name>','')|noAutoescape}
-
Re: how to access system property on soy?
ansaxena@informatica.com Jun 4, 2013 10:48 PM (in response to deesteel)Thanks a lot Dave it worked...
Regards,
Ankit
-
Re: how to access system property on soy?
deesteel Jun 5, 2013 8:16 AM (in response to ansaxena@informatica.com)Awesome glad it worked, can you mark the answer as correct so others can see it
-
-
Re: how to access system property on soy?
kshaw79 Jan 16, 2014 1:30 PM (in response to deesteel)Dave,
How did you learn that you can use getJiveProperty function in soy templates? I've tried other methods of the JiveGlobals class, but only the getJiveProperty method appears to work in a soy templates.
Cheers,
Keith
-
Re: how to access system property on soy?
jemerson76 Jan 22, 2014 11:41 AM (in response to deesteel)This isn't working for me on Jive 7, although I haven't tested it on 6 either. Do you know if the feature was removed?
-
Re: how to access system property on soy?
jemerson76 Jan 22, 2014 1:11 PM (in response to jemerson76)I have confirmed, this works in 6, but no longer works in 7.
Has anyone found another way to do this?
-
Re: how to access system property on soy?
deesteel Jan 22, 2014 4:55 PM (in response to jemerson76)Hi Jess,that sucks, just kicked off our Jive 7 upgrade project, so this is good to know that it no longer works. If I find out anything I'll post here.
-
-
-
-
Re: how to access system property on soy?
samarth.shekhar02 Jan 31, 2014 1:25 AM (in response to ansaxena@informatica.com)Hi ,
Do any one came to know about using jive system property in Jive 7. I tried {getJiveProperty('<property name>','')|noAutoescape} but it is not compatible with Jive 7.
It throws me the error "Unrecognized function 'getJiveProperty'"
-
Re: how to access system property on soy?
Ryan Rutan Jan 31, 2014 6:53 AM (in response to samarth.shekhar02)I'll kick this off internally. I didn't realize that we had that method in Soy for Jive 6...so need to ask some people why / where it went in 7. Stay tuned. =)
-
Re: how to access system property on soy?
MohitVerman Feb 3, 2014 2:37 AM (in response to Ryan Rutan)Hi Ryan,
It would be of great help if someone can help on this getting in Jive7.
-
Re: how to access system property on soy?
pradeepgm Feb 19, 2014 1:49 PM (in response to MohitVerman)1 person found this helpfulHi Mohit,
You can try this method
{jiveProperty('<property-name>','')}
Pradeep GM
-
Re: how to access system property on soy?
phrough Feb 27, 2014 12:25 PM (in response to pradeepgm)Hi Pradeep, your suggestion doesn't seem to work. It's compiling as an empty function.
-
Re: how to access system property on soy?
pradeepgm Feb 27, 2014 12:59 PM (in response to phrough)It worked in other case. How to call jive system Property in Jive 7 for Soy
Can you post your sample code here?
Pradeep GM
-
Re: how to access system property on soy?
MohitVerman Feb 27, 2014 11:56 PM (in response to pradeepgm)Thanks pradeep, it worked for me.
-
Re: how to access system property on soy?
phrough Jul 2, 2014 3:00 PM (in response to pradeepgm)Here's the deal. This jiveProperty function only works if the soy template is rendered on the server. If its called via javascript the function is blank.
-
-
Re: Re: how to access system property on soy?
evdk May 8, 2014 4:04 AM (in response to phrough)Did you ever find a solution to this?
I've got the following code in my soy template:
{if jiveProperty('reporting.thirdParty.enabled','') == 'true'} {jiveProperty('reporting.thirdParty.code','')|noAutoescape} {/if}
But it gets compiled to this:
() == 'true') ? soy.$$filterNoAutoescape() : ''
The corresponding Jive property definitely exists (and is set to true), but even if it didn't I would expect to see an empty string.
Any idea where I'm going wrong?
-
Re: Re: how to access system property on soy?
phrough May 14, 2014 2:31 PM (in response to evdk)Try it without the |noAutoescape. I've found this function to have issues with noAutoescape
-
Re: how to access system property on soy?
laurian.muresan Apr 8, 2019 7:07 AM (in response to evdk)Hi,
I have the same issue, did you find a solution for it?
-
-
-
Re: how to access system property on soy?
aneesharao May 17, 2014 8:12 AM (in response to pradeepgm)Hey Pradeep.. Worked like a charm.. Thanks a lot
-
-
-
-
-
Re: how to access system property on soy?
shruti_ramnarayan Mar 30, 2015 1:51 AM (in response to ansaxena@informatica.com)I am getting the value 'undefined' when using {jiveProperty('<property-name>','')} in soy template and error while saving template when tried using {getJiveProperty('<property name>','')|noAutoescape}.Does any one know any other solution to read the system property in soy template in Jive 7.
i want to assign the value to href in <a> tag.
-
Re: how to access system property on soy?
samarth.shekhar02 Mar 30, 2015 3:41 AM (in response to shruti_ramnarayan)Hi,
{jiveProperty('<property-name>','<default-value>')} only works when the soy is rendered on the server side. If the soy template is called from javascript the value will be returned as "undefined" or a blank function call.
-
Re: how to access system property on soy?
laurian.muresan Apr 8, 2019 7:12 AM (in response to samarth.shekhar02)Hi,
Do you know a workaround when the template is called from js ? i get the blank function call and i want to get rid of it
Thank you
-
-
-
Re: how to access system property on soy?
jessef Jun 1, 2015 7:28 PM (in response to ansaxena@informatica.com)How can you get a sys prop with a dynamic name.
var foo = '{$prop.value}';
var y = '{getJiveProperty('sys.prop'[foo],'')}';