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

How to access Gloabal objects in HTL

Avatar

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
rohitn62196663
Level 3

12-10-2016

I have gone through the documentation in below url about Global objects in HTL:

https://docs.adobe.com/docs/en/htl/docs/global-objects.html.

 

I need to change the below existing code in JSP to Sightly(HTL):

<%

 if (WCMMode.fromRequest(request) == WCMMode.EDIT){
            %><img src="/libs/cq/ui/resources/0.gif" class="cq-carousel-placeholder" alt=""><%
        }

%>

I want to access the wcmmode and the request object directly in sightly without using the Java class. However I am facing issues in doing that. Could someone provide me the way(syntax) to access the objects directly in HTL ?

Thanks.

View Entire Topic

Avatar

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
rohitn62196663
Level 3

12-10-2016

Thanks a lot it worked. I was using the upper case thats why it didn't work.