data-sly-resource | Cannot find servlet to handle resource error
Hello,
I am new to HTL (formerly known as Sightly) and am trying to understand its data-sly-resource attribute.
- I've added a node to my template which has a jcr:primaryType=nt:unstructured and sling:resourceType=/apps/myproject/components/structure/templates/sitenav (this is a navigation bar component).
- Also, the template has a sling:resourceType set to /apps/myproject/components/structure/templates/basepage.
| apps/myproject/templates/page/base |
|---|
|
Further, the data-sly-resource="sitenav" is added in the /apps/components/structure/templates/basepage/basepage.html (basepage is the component that the template point to with sling:resourceType.
| /apps/myproject/components/structure/templates/basepage/basepage.html |
|---|
![]() |
Now, on creating a webpage with the above mentioned template, I was expecting the Site-navigation to appear on the page, instead this is the result:
| Webpage |
|---|
![]() |
It'll be great if someone can help me understand what I'm doing wrong here?
Also, when I add the entire path of the sitenav component...
| path for resourceType... |
|---|
![]() |
it works....
| Webpage works...with Site Navigation at the top... |
|---|
![]() |
Thanks in advance
smacdonald2008, if possible, please look into this. Thanks!




