Forum Discussion
karthikeyan
7 years agoGuide
<#function getFieldValue field="" defaultValue="" > <#if field?? && field?has_content> <#return field!defaultValue /> <#else> <#return defaultValue /> ---------------------- <#assign apiVersion = "2.0" /> <#function executeLiQLQuery qry isCount=false charSet="UTF-8"> <#if isCount> <#return (rest(apiVersion, "/search?q=" + qry?url(charSet) + "&restapi.response_style=view").data.size)!0 /> <#else> <#return (rest(apiVersion, "/search?q=" + qry?url(charSet) + "&restapi.response_style=view").data.items)![] />
Parshant
7 years agoBoss
You need to create copy of same function executeLiQLQuery with different name, and change "rest" to "restadmin". Like this.
<#function executeLiQLQuery qry isCount=false charSet="UTF-8"> <#if isCount> <#return (restadmin(apiVersion, "/search?q=" + qry?url(charSet) + "&restapi.response_style=view").data.size)!0 /> <#else> <#return (restadmin(apiVersion, "/search?q=" + qry?url(charSet) + "&restapi.response_style=view").data.items)![] />
- karthikeyan7 years agoGuide
Sure, I will try and let you know. Thanks!
Related Content
- 11 months ago
- 6 years ago