We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10842
    • 6 Posts
    Hi please help, I now have just begun to get my head around the basics of MODx and am jumping in fully with both feet.

    However I have come up against a wall. I am using revolution and I am unable to update or save templates.

    I made an assumption that perhaps the files and the file structure were not loaded so attempted to replicate where they may be i.e:
    assets/templates/ and set the correct ftp permissions(775).
    I then created the BaseTemplate.tpl file to see if this solved the update problem but did not.

    Currently all I have in my ’assets’ folder is what I had after set up eg an empty ’components’ folder.

    I am not quite sure what has happened, please can somebody point me in the correct direction.

    Thanks.
      • 25519
      • 265 Posts
      Hi

      To be honest i’m a little woolly about what you’ve done but I’ll explain what I do and hopefully that’ll help you along. (i’ll assume you’re using Revo as you mentioned ’components’)

      1: create your own templates with the TV and chunk calls in the relevant places. Do this on your local machine with whatever html editor you like.
      2: create a new template in your live Revo site: Elements > New Template - give it an appropriate name, description, category
      3: add the markup from your locally created template into Revo in the box marked Template code (html)
      4: Save your template into whatever category appropriate (tip: use as few templates as possible!!! if I ever get to 3 or more then i become very critical of my methods and start to rethink)

      Then, when you go to create a new resource, select a template from the Uses Template: dropdown and you’ll see the template you created. Or, you could set your new template as the default site template and it will be applied automatically (holler if you need to know how to set a default template wink)

      With modx, templates are flexible to the nth degree, which was what instantly converted me. For example, I like to keep all of my <head> items in chunks ... e.g. I like to keep <title> <meta description> <base href> all in one chunk - [[$title-desc-baseurl]] - like this:
      [[$title-desc-baseurl]]
      
      <title>[[++site_name]] / [[*description]]</title>
      <meta name="description" content="[[*introtext]]">
      <base href="[[++site_url]]"/>
      


      Or stylesheets (same applies to scripts):
      [[$common-stylesheets]]
      
      <link rel="stylesheet" type="text/css" href="[[++site_url]]assets/css/global.css" media="screen" />
      <link rel="stylesheet" type="text/css" href="[[++site_url]]assets/css/960_12-col.css" media="screen" />
      <!--[if IE 6]><link rel="stylesheet" href="[[++site_url]]assets/css/ie6.css" type="text/css"  media="screen" /><![endif]-->
      <!--[if IE 7]><link rel="stylesheet" href="[[++site_url]]assets/css/ie7.css" type="text/css"  media="screen" /><![endif]-->
      


      Hope this helps! But please bear in mind that this is only my way of doing certain things - I’m sure there are loads of different methods that modx’ers are going to post here ... cool

      Shout if anything here needs further clarification - I’m a bit on the hop but will get back asap.
        • 3749
        • 24,544 Posts
        If you mean the templates that MODx uses for resources (e.g., the base template that comes with the install), they are saved in the database, not as files.

        If you can’t save them, there’s a good chance that mod_security is the culprit: http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting