Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
We're looking to set up a system that replaces placeholder text on a page based on passed query string parameters. For example, the authored content would look like -
The customer, {CUSTOMER_NAME} can be sold the product for {PRODUCT_PRICE}.
And those placeholder values could be swapped out in the jsp through the url query string parameters -
/content/site/page1?customer_name=Smith&product_price=6.99
I'm sure we could develop this ourselves fairly easily but i was wondering if there was anything out of the box that supported any kind of content placeholder/text replacement?
Thanks
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
Hi,
In AEM/CQ, personalization (whether by geolocation or referrer or anything else) is meant to be done on the client side. It sounds like your whole system needs to be reconsidered.
That said, to answer your specific question, the closest thing included in the product would be http://commons.apache.org/proper/commons-lang/javadocs/api-2.5/org/apache/commons/lang/text/StrSubst...
Regards,
Justin
Zugriffe
Antworten
Likes gesamt
Before I answer this, I would like to know why you want to do something like this. I would highly discourage to use query string parameters since it breaks CQ dispatcher caching strategy completely. On the other hand, generally data is kept in JCR which you can display on JSP to bring in dynamism, I see no use case of end users passing all these parameters since you will have no limitations.
So before I answer can you let me know what is the use case you are trying to achieve?
Zugriffe
Antworten
Likes gesamt
Hi,
In AEM/CQ, personalization (whether by geolocation or referrer or anything else) is meant to be done on the client side. It sounds like your whole system needs to be reconsidered.
That said, to answer your specific question, the closest thing included in the product would be http://commons.apache.org/proper/commons-lang/javadocs/api-2.5/org/apache/commons/lang/text/StrSubst...
Regards,
Justin
Zugriffe
Antworten
Likes gesamt
Reposting this because it somehow got deleted:
I understand your skepticism, so i'll explain a bit more. Firstly, to your point about the dispatcher's cache - sad to say we've disabled the cache completely. All of our pages have to be dynamically created depending on the user (eg. a page will display differing content depending on what part of the country the user is in).
The use case for the replaceable parameters goes something like this:
Zugriffe
Antworten
Likes gesamt
Thanks Justin, i'll take a look at that. It's a bit more complicated than what i described, unfortunately. The personalization is based on two factors - location of the user and what role they are. The content that we filter out is information that they are not legally allowed to see. So we have to do it on the server side in the event that some user looks at the source and sees something they're not supposed to.
Zugriffe
Antworten
Likes gesamt
Hi,
Yes, I agree that security and personalization are different and that security must be handled on the server side. That said, passing the price via a query parameter is not really secure so I'm sure you can understand the confusion.
Justin
Zugriffe
Antworten
Likes gesamt
Ha absolutely, price was probably a bad example. It's more contextual information than anything that would be a security issue.
Appreciate the help!
Zugriffe
Antworten
Likes gesamt