GetSimple Support Forum
Front Router - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: Front Router (/showthread.php?tid=8254)



Front Router - lokothodida - 2016-03-25

GetSimple Front Router Plugin

A plugin that executes custom-defined actions dependent on the front-end request URL. Designed to be used in conjunction with other plugins in order to build desired URL structures and route actions without modifying any .htaccess files.

Links Requirements
  • PHP 5.3+
  • GetSimple CMS 3.3.7+
Screenshots Features
  • Dynamically choose page content based on URL
  • Easily create error pages for specific page types
  • Pull together functionality from other plugins and display your own page content
  • Easily create front page routes for your own plugins
Getting Started
  • Install and enable the plugin.
  • Go to Plugins -> Manage routes.
  • Add, edit and delete your routes.
  • Visit a URL on your site that matches the pattern to test your route.
  • Check out the wiki for more information.
Examples Wiki
Full examples and documentation are available on the wiki. Contributions are welcome.

License
GetSimple Front Router is licensed under MIT.

Copyright
All rights reserved.


RE: Front Router - shawn_a - 2016-03-25

Neato, dont forget there are other hooks you can use if you do not want to wait for 404s
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/705


RE: Front Router - lokothodida - 2016-03-25

Thanks.

I got slightly inconsistent behaviour when using the data_index filter for some reason. I wasn't able to simply use the same function that I used on error-404, because then it would lead to 404 errors for all real front end pages. Is that filter meant to take the $data_index object as a parameter and return it? Also is the $data_index variable null prior to the filter being called?


RE: Front Router - shawn_a - 2016-03-25

Sounds about right, it could be an empty xml object though,id have to look


RE: Front Router - shawn_a - 2016-03-25

The data index filter is probably more useful for injecting fake pages or modifying real ones fields.


RE: Front Router - lokothodida - 2016-03-25

Ahh - the index-postdataindex hook is what I wanted. Thanks.

The plugin has been updated to version 0.2 and has language files for French, Russian, Italian and German.