We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Hiya,

    I have a mobile detect on all pages, with some pages sharing use of the same template - thus my original code:

     <a href="[~[*id*]~]&template=[*alias*]">link</a>


    Will not work here, I need all pages to have the ability to template switch as by default i want the mobile detect template swithcher to switch the template if it feels it needs to, then the user can switch back if they want....

    Does that make sense?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Then why do you need so many templates? One for screen, and one for mobile should be all you need; if it were me I’d design my site so I could use the same template and just use a different CSS file for mobile. There is even a media attribute "handheld" for alternate stylesheets.

      The TemplateSwitcher plugin was designed for a web designer who wanted to have the same document with the same content but different templates, all linked from thumbnails of screenshots of the different templates. I don’t see where it really suits your purposes.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 8168
        • 1,118 Posts
        OK Susan, Don’t worry I will sort it via a different solution.


        Thanks
          • 8168
          • 1,118 Posts
          The site has different templates for each of the pages as I dont want my client to be able to edit (and therefore muckup) some of the page content that is not editable and this changes across the various pages ;]
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Then use TVs. Create a manager user group and a document group (Security -> Manager Permissions) and connect the two. Edit your admin user and assign him to that user group, but don’t assign your editor user to the group. When you create the TV, assign it to the document group. Now, only manager users belonging to the group can see the TV.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org