How to use Sling 2.0 taglib feature in sightly | Community
Skip to main content
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 gopalKa

It is not possible to do this. Please let me know what features specifically you are looking for.

6 replies

gopalKaAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

It is not possible to do this. Please let me know what features specifically you are looking for.

Feike_Visser1
Adobe Employee
Adobe Employee
October 16, 2015

Correct, with sightly you can't use taglibs.

Level 3
September 23, 2016

Is there way .. we can  get instance of pagecontext in sightly class?

Feike_Visser1
Adobe Employee
Adobe Employee
September 23, 2016

Can you point me to this object, so I can have a look?

It is not listed here: https://docs.adobe.com/docs/en/htl/docs/global-objects.html?wcmmode=disabled

Feike_Visser1
Adobe Employee
Adobe Employee
September 23, 2016

Checked the object, but to me it seems that PageContext is for JSP only.

What are you trying to achieve?

Level 3
September 24, 2016

Thank you very much for looking into it.

We are moving to Sightly for all the existing components which are developed in JSP

These existing JSP components connecting with the View Helpers which are java classes which are having logic to return the values to JSP.

These classes requires pageContext to be passed as their constructor argument.

To not to rework on the whole bunch of view helpers for the Sightly components, we are planning to create an instance of pageContext in the sightly class which extends WCMUsePojo.

Using that pageContext we can create the viewhelpers inside this class by passing this pageContext to the viewhelpers constructor.

Example what we are trying to do :

class SightlyHelper extebds WCMUsePojo {

//create a pageContext instance

ViewHelper helper = new ViewHelper(pageContextInstance)

}

So that we can use all viewhelper methods inside my Sightly component.