Template Rewrite + Mobile



3rd Party (Commercial)
Minimum EE Version: 2.7.0
Release Date: Apr 24, 2015

License Agreement

Buy Now!


EE Version Support

  • ExpressionEngine 2


If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher


Add-On Type(s)



This extension allows you to use shorter links to your site, as well as help in creating a mobile version of the site.

Platform:  ExpressionEngine
Tested on Version 2.7.3
Required: NSM Morphine v2.0.4 or higher

This extension allows you to use shorter links to your site, as well as help in creating a mobile version of the site.

Template Rewrite

Let’s say you have a page you’re accessing that’s using EE native routing:
http://site.com/site/entry-details/product-url-title, where “product-url-title” - is url title of entry

This will obviously load up the ‘entry-details’ template in the ‘site’ template group.

But you can reduce link to the url title of entry:

The same operations can also be performed with the Categories and with the Users.

You can use rewrite rules:
- Segment
- Channel
- Category
- Member

For Channel, Category and Member rules, you can use appropriate extra global variables:
* {tmpl:entry_id}
* {tmpl:title}
* {tmpl:url_title}

* {tmpl:cat_id}
* {tmpl:cat_name}
* {tmpl:cat_url_title}

* {tmpl:member_id}
* {tmpl:username}

Mobile compatibly

You can enable Mobile compatibly for your site,
and create template structure like this:

  Regular templates:
  - site*
  —- index
    —- entry-details
  - contact
  —- index

  Mobile templates:
  - mobile__site
  —- index
      —- entry-details
  - mobile__contact
  —- index

When you duplicate template group and prepend ‘mobile__’ prefix,
The system will detect your device and display required template.

{embed=”“} and {stylesheet=”“} construction not processed

Extra global variables:
* {tmpl:switch_to_full}  -  URL for switch templates to desktop version
* {tmpl:switch_to_mobile}  -  URL for switch templates to mobile version
* {tmpl:switch_to_tablet}  -  URL for switch templates to tablet version
* {is_mobile}  -  TRUE|FALSE
* {is_tablet}  -  TRUE|FALSE
* {is_iOS}    -  TRUE|FALSE
* {is_AndroidOS} -  TRUE|FALSE

How to install:
1. Check for the existence of NSM Morphine
2. Upload all files to document root
3. Enable extension

Template Rewrite + Mobile Links

Hooks Used

If the add-on is an extension, and ties into ExpressionEngine's core files, it will use ExpressionEngine hooks. We are listing any hooks the add-on uses for developers to have an easier time locating other add-ons that they can reference for their own work.

  1. core_template_route

This entry was created April 27, 2015, 9:04 am.
This entry was last updated November 18, 2015, 9:45 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

1 Review:

Brett Burwell 09.10.15

Rating - {addon_rating_average}

It works exactly as advertised and made setting up a simple mobile site quick and painless.