We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30636
    • 22 Posts
    Hi All,

    By mistake I have made some changes to the modxhost theme template which made it corrupted.. Can any one please give me the template code for modxhost template , It Looks like template of http://www.modxhost.com . Or can you please tell me the path where the template code exists. This template comes as default when MODX 0.95 is installed.

    Please help me in this regard,

    Thanks in advance.
      • 7923
      • 4,213 Posts
      setup.data.sql search for "MODxHost" and copy paste the template code in to a new php file that contains:

      <?php
      $template = "...copy paste the template string here...";
      echo $template;
      ?>
      


      then access that php file and you’ll get your code tongue


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Or just copy/paste that whole "REPLACE INTO" line (around line 206) into an sql field in phpMyAdmin. Just make sure to change the {PREFIX} to modx_ or whatever you used for a table prefix.
          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
          • 30636
          • 22 Posts
          Quote from: sottwell at Oct 13, 2006, 12:38 PM

          Or just copy/paste that whole "REPLACE INTO" line (around line 206) into an sql field in phpMyAdmin. Just make sure to change the {PREFIX} to modx_ or whatever you used for a table prefix.

          Thanks for the reply,

          I got it Back smiley Thanks a Lot.

          If all the template html code is stored in the database , How can I Add , few css and Javascript files to the template. The previous one was corrupted when I tried to add some js file location in the header part.

          some this thing like

          <script src="manager/media/script/myscript/tips.js" type="text/javascript">

          in the header part .

          Can any one suggest me how can I add my custom Js files.


          Please help me in this regard,

          Thanks in advance.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            You just edit the template, and put the usual <script...></script> tags, and save. If that corrupted your database, you’ve got bigger problems than anything MODx can do.

            It should look like this:
            <script src="manager/media/script/myscript/tips.js" type="text/javascript"></script>
            


            For specific javascript for specific pages (forms and such) you can use
            $source = 'assets/js/myscrip.js';  (or whatever your script's location and filename is)
            $modx->regClientStartupScript($source);
            

            in a snippet, call the snippet in the document’s content, and the line to include the script will be added to the template’s head for that page.
              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