Forum Discussion

janh's avatar
janh
Mentor
12 years ago

REST API call to detect whether or not a feature is enabled

Hi Lithium Community,

 

Is there any way for me to detect whether or not a feature is enabled before any further rest calls are made to the feature? For instance I'm working on a customized version of the Tag Cloud but I want to put in safeguard to prevent the component from erroring out if Tagging was disabled.

 

The following example didn't work for me :

 

<#if !rest("categories/id/<category id>/tagging/tags/top")?? >

   ... list tags ...

</#if>

 

But it just saw it as a problematic instruction:

 

status="error" code="303" message="A required feature is not enabled: tagging." 

 

 

Thanks,

Jan