How to limit the properties of a component when included on a page using data-sly-resource | Community
Skip to main content
New Participant
March 14, 2016
Solved

How to limit the properties of a component when included on a page using data-sly-resource

  • March 14, 2016
  • 3 replies
  • 1344 views

I am trying to disable the dialog for a component when it is included on a page template using a data-sly-resource. The component has the dialog but should be disabled only when it is referenced on a page. Please suggest on how to achieve this.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by edubey

Try this

    
<div data-sly-resource="${'path/to/resource' @ wcmmode='disabled'}"></div>

3 replies

New Participant
March 15, 2016

I actually want to reference a page-component(which is developed on a different page template) on a particular page template and dont want to make it editable except in the actual location.

 

For example: A footer which is developed on a page and included on other templates.

edubey
edubeyAccepted solution
New Participant
March 15, 2016

Try this

    
<div data-sly-resource="${'path/to/resource' @ wcmmode='disabled'}"></div>