SLING REQUEST URL | Adobe Higher Education
Skip to main content
Questo argomento è stato chiuso alle risposte.
Migliore risposta di SantoshSai

Hi @prashanthal,

Suffix usually used to provide additional information to your servlet/JSP page. Just check editor interface in TouchUI: the url looks like

http://localhost:4502/editor.html/content/pageYouEdit.html

So you always stays on the same page /editor.html, but suffix notifies Edit Interface which page to edit. 

Reference: Here is the best example between selector and suffix has been answered - https://stackoverflow.com/questions/41345775/what-is-the-use-of-suffix-in-sling-urls

 

Best way to use suffix in AEM URLs

It is better to use the suffix with selectors only that will help the dispatcher when flush cache.
Eg:-
<resource path>/results.html

<resource path>/results.html/suffix (Not recommended )

<resource path>/results.html/suffix.suffix1 (Not recommended )

<resource path>/results.slelector.html/suffix (Recommended)

<resource path>/results.slelector.html/suffix.suffix1 (Recommended)
 
Hope that helps!
Regards,
Santosh

2 risposte

arunpatidar
Community Advisor
Community Advisor
November 7, 2022

It depends on use case,

for example page editor use this to identify the page to be edited

http://localhost:1450/editor.html/content/myapp/us.html

 

 

Arun Patidar
SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorRisposta
Community Advisor
November 7, 2022

Hi @prashanthal,

Suffix usually used to provide additional information to your servlet/JSP page. Just check editor interface in TouchUI: the url looks like

http://localhost:4502/editor.html/content/pageYouEdit.html

So you always stays on the same page /editor.html, but suffix notifies Edit Interface which page to edit. 

Reference: Here is the best example between selector and suffix has been answered - https://stackoverflow.com/questions/41345775/what-is-the-use-of-suffix-in-sling-urls

 

Best way to use suffix in AEM URLs

It is better to use the suffix with selectors only that will help the dispatcher when flush cache.
Eg:-
<resource path>/results.html

<resource path>/results.html/suffix (Not recommended )

<resource path>/results.html/suffix.suffix1 (Not recommended )

<resource path>/results.slelector.html/suffix (Recommended)

<resource path>/results.slelector.html/suffix.suffix1 (Recommended)
 
Hope that helps!
Regards,
Santosh
Santosh Sai