kiettuongwork
7 years agoContributor
How to retrive info from query string and pass into component in Lithium
Hi Support Team,
I have tried to check how component in Lithium queries data for 4 pages above.
There is an issue need to get advise from Lithium support.
Scenario:
Once we access URL as below
- http://community.digi.com.my/t5/Blog/bg-p/11112222
- http://community.digi.com.my/t5/Reviews/bg-p/Reviews
- http://community.digi.com.my/t5/Let-s-Inspire/bg-p/LetsInspire
- http://community.digi.com.my/t5/New-Digi/bg-p/NewAtDigi
We want to get last part of URL in this case is "Reviews" and then pass that parameter to component name "recent-blog-posts"
And in component we will get parameter by using code as below
<#assign category = http.request.parameters.name.get("category", "") />
Question:
- Where should check that component is used in admin of Lithium?
- How can we parse parameter from URL after /bg-p and then pass that parameter to component recent-blog-posts?
- 11112222
- Reviews
- LetsInspire
- NewAtDigi
Thanks,
Mickey