Hi,
Sorry if this is covered somewhere - had a good dig around but couldn’t spot it.
I’ve got a piece of external PHP scripting parsing a very ugly XML feed - this is working fine, and is plugged into modX as a snippet. It displays as expected but there is a link to a ’detail’ page that is meant to show the detailed information on one of the data chunks in the XML.
This is working outside of modX by passing a URL parameter to the second page, it then shows the relevent data.
I’ve created a new page in modX, added the relevent PHP as a snippet but it’s failing as it doesn’t see the URL parameter.
Best I’ve determined so far is that the mod_rewrite antics going on is losing my parameter. Is there a built in way to link to another modx page and pass a parameter that will be usable within the snippet the second page includes?
Hope this makes sense, and thanks in advance,
Steve
-
☆ A M B ☆
- 24,524 Posts
Take note of how MODx handles internal URLs along with your .htaccess file. If you have friendly URLs turned on, your URLs will look like ".../page.html?key=value". If you don’t have friendly URLs it will look like ".../index.php?id=42&key=value". So if you use the [~42~] tags to automatically generate the URL, you have to keep in mind which form it will take, and use ? or & as appropriate.
Thanks for this, that makes some sense.
Is there a support page anywhere that gives some examples of syntax?
I am using friendly URL’s, and want to pass a parameter of newsid=XX into another internal page.