Browser URL in Sightly

Avatar

Avatar

arvind

Avatar

arvind

arvind

02-09-2020

Dear Team,

 

Is there any way we can print exact browser URL in Sightly HTML?

 

e.g.

1) if Page url is http://localhost:4502/editor.html/content/home.html

 

It should print exact same i.e.  http://localhost:4502/editor.html/content/home.html

 

2) If Page url is http://localhost:4502/content/home.html

 

It should print exactly same i,e http://localhost:4502/content/home.html.

 

Note: I tried with  ${request.requestURL.toString} but in both the cases it prints only 

 

http://localhost:4502/content/home.html. . It ignores editor.html.

 

Thank you in advance.

View Entire Topic

Avatar

Avatar

arvind

Avatar

arvind

arvind

02-09-2020

@Varun_Shakya , Thank you for your reply.

 

Actually my req is to add some class in a div only when we are in edit mode i.e. when url contains editor.html.

 

I already tried wcmmode.edit but unfortunately it always gives me true whether I hit  http://localhost:4502/editor.html/content/home.html  or  http://localhost:4502/content/home.html.

 

Regards,

AP