Hi!
I want to create landing page but with contact page
Strucutre
Home
- Services [Collections]
- - service 01
- - service 02
- - ...
Contact page
In my Home page, I create slider witch load short content from the service page, when I click on the slide i create a js popup with fetch() the full content of the service page it was clicked
PROBLEM is
if I open service page with URL site.name/service01-URL it open the page but I don’t want to open it (it must open a popup on the main page with fetched content from service01). But URL Contact page must be opened normally
Questions
How can i check URL of the site and if URL is child of Services page - load home page and open popup.
Maybe you have batter idea how create this (maybe unpublished all services pages and create some page with type JSON and put all services there and then fetch URL with hash parameter via js site.name/#service01 to open popup?)
Any idea?
Maybe not the best idea, but you could use an extra like Redirectoid in your service pages to redirect to the Home-page. And for example add a request parameter &urlParamString so you know what service to load on your Home-page.
Another way is the rewrite the request in the .htaccess file or in a plugin in MODX (probably on the system event OnMODXInit or OnHandleRequest).
Do the services need to be MODX resources?
Maybe you could instead store the information in a custom database table and then use something like CustomRequest.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.