We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Creating a module with custom frontend URI

Development and Programming

SaucePan Creative's avatar
SaucePan Creative
32 posts
14 years ago
SaucePan Creative's avatar SaucePan Creative

So I want to create a module that has a custom URI available to the front end of the site. Currently the only way I know to do this is comment out the $routing variables in the index.php and create my own CodeIgniter controller. This is essentially exactly what I want to do, except I want to do it without modifying index.php.

The members module for example has the /member segment. I know this is a bit different, but I essentially want to achieve the same thing.

I have been trying to solve this problem for a while now, this post (the link below) has been the most help. I want to stick to the best-practices of ExpressionEngine and CodeIgniter but I have seem come to a dead end.

http://paramoreredd.com/blog/entry/harnessing-the-power-of-codeigniter-in-expressionengine-2.0/

For instance, if I wanted to create a URL shortener module that will output JSON and XML responses and redirects, I would want to create a module that would automatically create this URI’s ({site_url}/url_shortener/method_name) to shorten the urls, and a url for redirecting. I know this could be accomplished by creating templates, but I don’t want to do that.

How would this be accomplished without overwriting 3 lines in the index.php file?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.