Hey there,
I’m using ModX for my CMS, and am integrating the phpFlickr library to extract/render my photostream on the site. I need to pass photo information in a URL in order to pull the image information together.
I have a URL titled /gallery/ which I’m able to pull flickr images into directly using a generic most recent photoset call. The problem is if I want to pull a specific photoset or specific image, I’m not able to pass this in the URL, the format of which is /photosetID/photoID, as follows:
www.myurl.com/gallery/123456789/984651321
I can’t seem to figure out how to pass these variables without hitting the "ERROR: Too many forward attempts" message, without hacking out some core functionality or creating a lot of .htaccess work.
is there a simple convention for this in ModX?
Thanks!
-
MODX Staff
- 10,725 Posts
If I understand correctly, you can handle custom URLs via a plugin attached to the OnPageNotFound event, using the $modx->sendForward() method to load the intended Resource. You can set the additional parts of the URL into the $_REQUEST or using $modx->setPlaceholder() before calling $modx->sendForward() to make use of these in the Snippets you have on that Resource.