I use data-sly-resource like this.
The goal is to create a component where you can pick a begin date and an end date.
<div>
van:
<div>
<sly data-sly-resource="${'./date1' @ resourceType='fd/af/components/guidedateinput'}"/>
</div>
tot:
<div>
<sly data-sly-resource="${'./date2' @ resourceType='fd/af/components/guidedateinput'}"/>
</div>
</div>
The problem im having is that the class selectors aren't placed on the html tags for the date input component in preview mode.
And because of that the css isn't loaded.
This is edit mode.
This is preview mode.
Thanks
Views
Replies
Total Likes
In your syntax - i am not seeing any reference to class in the divs. For example --
<div class=
"twelve columns"
>
Place class referennce ins the <div> tag that corresponds to CSS.
Views
Replies
Total Likes
The css needs to be placed dynamicaly.
The data-sly-resource loads in the whole html component with the css class selectors.
This works in edit mode but not in preview mode.
Views
Replies
Total Likes
Does it work when you remove /editor.html/ from the URL and it serves up the page without Touch UI mode.
Views
Replies
Total Likes
No same result as preview mode
Views
Replies
Total Likes
Could you please try this:
<div>
van:
<div>
<div data-sly-resource="${'./date1' @ resourceType='fd/af/components/guidedateinput'}"></div>
</div>
tot:
<div>
<div data-sly-resource="${'./date2' @ resourceType='fd/af/components/guidedateinput'}"></div>
</div>
</div>
Views
Replies
Total Likes
This didn't work
Views
Replies
Total Likes
Edit the HTML of the component so as to remove dependency on rendering by Author and/or Preview mode.
Views
Replies
Total Likes
Could you please details on how the above said CSS is rendered in fd/af/components/guidedateinput' component ?
Views
Replies
Total Likes
This is the out of the box component.
This is one of my components...
The class selecters aren't placed on..
i'll guess it has something to do with with cq:styleConfig that isn't loading when using data-sly-resource?
Views
Replies
Total Likes
@Pekket
I understand the issue. Could you please send me your code which is not working over mail. I will do an analysis and see if I can figure out the exact issue
Thanks
Veena
Views
Replies
Total Likes
What code you want me to send? Can't send whole project..
Views
Replies
Total Likes
Oh thats my bad. I mistook this post for some component in AEM core components. I was not aware this was specifically for adaptive forms .
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies