Search

I've not looked into this in too much depth yet, but I have a question which has come about from the desire to use URL routing, and the Root Page Params extensions in tandem...

I am wanting to have the 'pages' of my application as params of the homepage, which can be accessed directly from the root using the Root Page Params extension. All fine.

Being me, and liking to cause problems ;o), I am also wanting to have usernames accessible from the root, and redirected to /users/$username which can be done with the URL Router extension. There will also be a lot more logic on top of that to have user-specific content routed off to other hidden pages... But that's another story.

Before I've even committed to designing the application around this url structure, I can guess that the two extensions will probably trip over each other. The URL Router is designed to ignore routes that don't register in it's list of routes to rewrite, but I'm thinking that the Root Page Params extension isn't. I'm sleepy and can't get my head around the code flow.

Will the two trip over each other? What exactly does the RPP extension do if it encounters parameters that it can't map to the index page's handle? Does it fallback to the original requested URL, or to a 404, or to the root url only?

I am not really sure how the url router extension works, but I do know things about the RPP extension;)

The RPP is triggered when a normal page can not be found, in other words, if normally a 404 is triggered, the RPP will prepend the chosen page to the query string, and try again.

For the URL router there are two possibilities: if it works its magic before symphony translates the url into pages, the two will not even know the other extension is installed. If this is the case, you should keep in mind the RPP will do its magic after the URL router extension, so all routes should not rewrite the RPP URL's.

However, I think the URL Router works almost the same as my extension, which might lead to unexpected results if both are changing the URL at the same time. However, this too can be avoided if you choose your routes correctly (so they don't have conflicting instructions).

As a sidenote: I have not investigated this thorougly, so your results may vary.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details