@antsplace:
I wouldn't have any idea how you'd go about doing such a thing...
That's ok. Most of the code needed for my solutions are already on the forums.
One thing to consider is that I am using the supercache plugin...
I don't think that this affects anything. Generally this is the least fickle of the Template/OnPageNotFound Plugins that I have written. It doesn't require any funny cache tricks, is compatible. This is how it works:
Synopisis
You make a Template called Alias (Template). It adds a "sub-page"/extra path segment to every document of a given Template that it is a child of. An Example: If you make a Resource of the Alias Template named "edit-form" and make it a child of any single Resource of the Argyle Template, All Argyle Resources will have the extra URL path "/edit-form".
The way you would use it is you would make a Resource, give it the Template "Alias (Template)", name it "mobile" and place a copy under
one of every
type of page that you need to be mobile. From there, you just make a single snippet that grabs the content from its "parent" (notice the quotes). I know that many are not necessarily code-oriented like me, so I do help with this. if necessary. It is mych easier to demonstrate than to explain. Hopefully, this makes sense so far?
The down-side (based on your need) to this plugin is that it will not apply to every page, just every page of any template that you place one under. If you have a lot of templates that all need the
same functionality, then this isn't the best solution. Also, the "mobile" resource would be "hybrid"-cached. That is, it would use cached content, but it itself would query everytime. The load is typically negligible, however, and you would not have to worry about diluting search results. The real question is going to be, how many Templates do you have? If you have more than 1, then this solution is still useful (often incredibly), but it will need to be tweaked. If there is just the 1, it will accomodate you perfectly.
The up-side is that it uses very little processing to accomplish what you need, even if you have 50 Templates. Another upside (based on my needs) is that it allows you to have specialized extra functionality for each template. The major consideration for your needs (as you state them) is that it uses one resource, one snippet, and one plugin. No Contexts, no cache tricks, and you may cache everything as normal. Strictly speaking, it is not a Template Switcher, but a Template Complement. The new Template is its own Template and is the new Resource is a "shared" Resource.
The plugin is simple. Just grab the code from and follow
this tutorial, If you have problems with it, simply let me know. (PS, the tutorial is still a work in progress, so if there is something you don't understand, let me know. The code is quite stable) Also, I do work with people directly over Skype or GTalk (just e-mail me from my profile), the whole process just takes a few minutes (literally).
[ed. note: fuzzicallogic last edited this post 11 years, 8 months ago.]