We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51550
    • 12 Posts
    Hello my friends, sorry for bothering you with such a simple (for y'all guys) question.

    The problem is that i am extra new to MODx and i'm really out of time.

    My job is to make a existing webpage built on MODx responsive.
    My problem is that i can't find anywhere in FTP the files (templates, page structure files - call it as you want)to edit this thing up.
    I have The fc_user login (wich gives me permisions only to resouces and files tabs), FTP, SSH account and a very short term. You are my only solution. I have listed The guide and i can't find anywhere how to make it trough anything else than builder.

    I really need your help guys, and i hope there is somebody that will help me. Sorry if my post causes any issues or is not under the rules of forum.

    Best Regards,
    MODx noob.

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      The things you're looking for are most likely all in the database, so you won't find any files, but you can edit them in the MODX Manager. Much of what you want will be found on the Elements tab in the Manager. The Templates will be under the Templates folder. The Templates will probably contain chunk tags, they look like this:

      [[$ChunkName]]


      You'll find a chunk by that name under the Chunks folder in the Elements tree. The tag above is replaced by the content of the chunk.

      You may also see snippet tags:

      [[SnippetName]]
      [[!SnippetName]]


      In those cases, MODX finds the snippet, which is a bit of PHP code, runs the code, and replaces the tag with whatever the snippet returns.
        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
        • 5430
        • 247 Posts
        It sounds like your biggest problem is that the account you've been given doesn't give you access to the Elements tab, where all the stuff you need actually is. Any chance your account includes user management authority? If you go to Manage/Users can you either add yourself to the administrator user group or create a new admin user? If you can't access the Elements tab, the only way you can access the template code would be via the database, but it doesn't sound like you have access to that either.

        You need access to the Elements tab, or, at the least, access to the database. The template markup is stored in the database.

        Sorry, this sounds like a totally crappy situation. If you can get yourself bumped up the admin status and get access to that file tree, we can help you get things fixed up.
          • 3749
          • 24,544 Posts
          Do you have direct access to the database (in cPanel's PhpMyAdmin)? If so, we can tell you how to change your permission status.
            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
            • 51550
            • 12 Posts
            Hey Guys, thank you so much for your attention.

            Yesterday i fixed my problem by copying the crypted password i know "in phpmyadmin" to the globaluser password field laugh

            Now i'm in and i have 1 question. To implement Bootstrap i have to edit the structure of each block, wich means i will have to enter each snippet and chunk for this?

            It's very nice to see how people are ready to help)
            Nice co-op guys, i love it.

            Best Regards.
            • discuss.answer
              To implement Bootstrap you need to start with the Templates. At its most basic, a MODX Template is simply the HTML with all the dynamic content bits replaced with relevant MODX tags.

              The support files, CSS, JS, images, fonts are usually stored in the assets folder somewhere; I tend to use assets/theme/ or assets/themes/themename/ if there will be more than one theme involved. Anyway, then the links and script tags are edited to point to wherever you put the files.

              Due to the way MODX handles links internally, you also need to add a base tag in the HTML head before any links are defined. So a simple Bootstrap-based Template might look something like this (based on the Agency template from StartBootstrap)
              <!DOCTYPE html>
              <html lang="en">
              <head>
                <meta charset="[[++modx_charset]]">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <meta name="description" content="[[*description]]">
                <meta name="author" content="[[*createdby:userinfo=`fullname`]]">
                <base href="[[++site_url]]">
                <title>[[++site_name]] - [[*longtitle]]</title>
                <link href="assets/theme/steampunk/css/bootstrap.min.css" rel="stylesheet">
                <link href="assets/theme/steampunk/css/agency.css" rel="stylesheet">
                <link href="assets/theme/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
                <link href="assets/theme/steampunk/css/steampunk.css" rel="stylesheet">
              <!--[if lt IE 9]>
                <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
                <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
              <![endif]-->
              </head>
              <body id="page-top" class="index">
              
              <nav class="navbar navbar-inverse navbar-fixed-top">
                <div class="container">
                  <div class="navbar-header page-scroll">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                      <span class="sr-only">Toggle navigation</span>
                      <span class="icon-bar"></span>
                      <span class="icon-bar"></span>
                      <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand page-scroll" href="#page-top">[[++site_name]]</a>
                  </div>
                  <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav navbar-right">
                      <li class="hidden"><a href="#page-top"></a></li>
                      <li><a class="page-scroll" href="#about">About</a></li>
                      <li><a class="page-scroll" href="#recipes">Recipes</a></li>
                      <li><a class="page-scroll" href="#appendix">Appendix</a></li>
                    </ul>
                  </div>
                </div>
              </nav>
              
              <header>
                <div class="container">
                  <div class="intro-text">
                    <div class="intro-heading">Tips, Tricks and How-Tos from the MODX Forums</div>
                  </div>
                </div>
              </header>
              
              <section id="about">
                <div class="container">
                  <div class="row">
                    <div class="col-lg-12 text-center">
                      <h2 class="section-heading">About the Cookbook</h2>
                      <h3 class="section-subheading text-muted"></h3>
                    </div>
                  </div>
                  <div class="row">
                    <div class="book">
                      [[*content]] 
                    </div>
                  </div>
                </div>
              </section>
              
              <section id="recipes">
                <div class="container">
                  <div class="row">
                    <div class="col-lg-12 text-center">
                      <h2 class="section-heading">Recipes</h2>
                      <h3 class="section-subheading text-muted"></h3>
                    </div>
                  </div>
                  <div class="row">
              [[pdoResources? 
                &context=`web`
                &parents=`+0`
                &resources=`-1`
                &depth=`0` 
                &showHidden=`0`
                &limit=`0`
                &includeTVs=`recipesCategoryImage` 
                &tpl=`recipesContainersTpl` 
                &sortby=`menuindex` 
                &sortdir=`ASC`
              ]]
              </div>
                </div>
              </section>
              
              <section id="appendix">
                <div class="container">
                  <div class="row">
                    <div class="col-lg-12 text-center">
                      <h2 class="section-heading">Appendix</h2>
                      <h3 class="section-subheading text-muted"></h3>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-lg-12">
              <ul class="text-center">
              [[pdoResources?
                &parents=`17`
                &depth=`0`
                &tpl=`appendixTpl`
                &sortby=`menuindex`
                &sortdir=`ASC`
              ]]
              </ul>
                    </div>
                  </div>
                </div>
              </section>
              
              <footer>
                <div class="container">
                  <div class="row">
                    [[$footer]]
                  </div>
                </div>
              </footer>
              
              <!-- Recipes Modals -->
              [[getResources? 
                &context=`web`
                &parents=`+0`
                &resources=`-1`
                &depth=`0`
                &limit=`0`
                &sortby=`menuindex`
                &sortdir=`ASC`
                &showHidden=`0`
                &tpl=`recipesModalsTpl`
                &includeContent=`1`
                &includeTVs=`recipesCategoryImage`
              ]]
              <!-- End Recipes Modals -->
              
              <script src="assets/theme/steampunk/js/jquery.js"></script>
              <script src="assets/theme/steampunk/js/bootstrap.min.js"></script>
              <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
              <script src="assets/theme/steampunk/js/classie.js"></script>
              <script src="assets/theme/steampunk/js/cbpAnimatedHeader.js"></script>
              <script src="assets/theme/steampunk/js/jqBootstrapValidation.js"></script>
              <script src="assets/theme/steampunk/js/contact_me.js"></script>
              <script src="assets/theme/steampunk/js/agency.js"></script>
              
              </body>
              </html>
              

              http://modxcookbook.com

                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
              • discuss.answer
                I would not recommend modifying any of the existing templates. I would suggest creating a new template, and assigning a test resource to use it. Then once it's working the way you want, you can either copy/paste the new template code to the existing template, or else change the resources to use the new template. The "Batcher" extra will help with the second solution.

                Use element Categories to organize your work. Having templates, chunks, TVs and the like just hanging around in the Tree can be very confusing.
                  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
                  • 51550
                  • 12 Posts
                  Thanks guys for advices

                  Quote from: sottwell at Dec 18, 2015, 09:57 PM
                  I would not recommend modifying any of the existing templates. I would suggest creating a new template, and assigning a test resource to use it. Then once it's working the way you want, you can either copy/paste the new template code to the existing template, or else change the resources to use the new template. The "Batcher" extra will help with the second solution.

                  I am working on Localserver with a webpage copy, so it really doesn't matter. Anyway thanks for advice!)
                  • Another thing... I never meddle with the CSS or JS files that come with whatever framework or library or theme I use. I add another CSS file (in this case, steampunk.css) where I handle overrides or any custom CSS I need to have. That way if someday I want to upgrade the framework or library I can, without my customization being lost in the upgrade.
                      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
                      • 51550
                      • 12 Posts
                      Hi guys, i received some new questions from this project.

                      1. [[++cultureKey]] <----- What is this? laugh
                      2. The webpage i am modifying is in a table format, and it's really awkward for me, because it's senseless (for me). Anyway, they inserted the logo as a background for a div, how do i change that with the permissions for the website owners to change it any moment they want?
                      3. I still din't understood what's the use of snippets :/

                      Best Regards and thanks for being awesome!
                      itWorks