Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to use Sling 2.0 taglib feature in sightly

Shehjadkhan
Level 4
Level 4

Hi All,

We want to move to Sightly in our current AEM application. Is there a way I can use features provided by Sling 2.0 Taglib (http://sling.apache.org/documentation/bundles/sling-scripting-jsp-taglib.html ) inside my .html files?

Thanks!

Shehjad

1 Accepted Solution
kalyanar
Correct answer by
Employee
Employee

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

View solution in original post

6 Replies
kalyanar
Correct answer by
Employee
Employee

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

View solution in original post

Feike_Visser1
Employee
Employee

Correct, with sightly you can't use taglibs.

Eakambaram
Level 3
Level 3

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

Feike_Visser1
Employee
Employee

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

What are you trying to achieve?

Eakambaram
Level 3
Level 3

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.