Search

A new Extension, “Root page params” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

This is my first (real) extension, so forgive me if some things aren’t as optimal as they could have been.

The basic use of the extension is to be able to give parameters to the index page. (so www.domain.com/params instead of www.domain.com/index/params)

Ofcourse I am always open to suggestions!

github: http://github.com/creativedutchmen/Root-Page-Params

ps: sorry for the mess, it’s my first time using github aswell!

I am sorry, but there already is an extension to do that: Improved Page Resolve. :-)

Darn, why do those plugins always have sinister names? argh!

I do think mine is cleaner.. Atleast that’s something..

Thats good. I always found the improved page resolve extension to be a bit… Well I didn’t quite get it. :-)

Can you modify yours so that it’ll use any page type (lets say “fallback”) instead of just “index”?

And what happens when your first param also matches a page name?

Thanks!

I could update it to do so but not now, maybe later.

The plugin does the following: It checks if the original request is found, if it isn’t, it prepends the index handle to it. Then it just releases the request for processing.

So: domain.com/test becomes domain.com/home/test internally, if test does not exist.

edit: where home is the index page, ofcourse

If the param is already a page, it would fallback to the page.

Root page params updated to version 1.1 on 10th of December 2009

Can you modify yours so that it’ll use any page type (lets say “fallback”) instead of just “index”?

You can now specify the page to fallback to. Enjoy!

Root page params updated to version 1.2 on 24th of February 2010

@creativedutchmen, this is a wonderful extension. I’m using it in tandem with ahwayakchih’s Filter Field. That way I can target what datasources are run when certain parameters are called.

I’ll report back with more detail as I use it more. But, so far, so great!!!

I really like this extension, is there any way to get it to do it’s magic with more than one page and it’s params?

No, this is not currently possible.

If you know a little php you can edit it, though! (the logic itself is just a few lines)

Oh, and thanks for the kind words! Really appreciated

@creativedutchmen - I’m running into the following problem after I install the extension. I put this in the issue tracker.

strpos(): Empty delimiter
    /Users/site/public_html/pcpcmissions.local/extensions/root_page_params/extension.driver.php line 71

    66                  
    67                  $params = $context['page'];
    68                  
    69                  if($this->_Parent->Configuration->get('map_sub_to_front', 'maptofront') == 'no'){
    70                      $tmp = substr($indexHandle,0, strrpos($indexHandle, '/'));
    71                      $params = substr($context['page'], strpos($context['page'], $tmp)+strlen($tmp));
    72                  }
    73                  //die($params);
    74                  
    75                  $context['page'] = $indexHandle.$params;

EDIT: OK, this happens when I don’t check “Map subpages to home page”. When I check “Map subpages to home page”, this error DOES NOT appear.

OK, this happens when I don’t check “Map subpages to home page”. When I check “Map subpages to home page”, this error DOES NOT appear.

Yeah, I had this too, but forgot to issue track it…

Will look into it.

Thanks for posting!

@bzrangue, can you post more information about your url setup?

Does the "Root page params" also work on the 2.0.8RC3 version?

yes it does.

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