We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • That cultureKey is a System Setting to specify the default language of the 'web' pages. This can also be set for different contexts so that they will use different languages.

    What, exactly, do you want them to be able to change? The div element, or just the background image? If it's just the image, I would make it an image-type TV that they can edit, perhaps attached to the home page for simplicity. Set up a Media Source for it so that the TV's file browser will only access a specific directory (assets/images/logo/). That way they can select an image or upload a new one. Use a small <style>...</style> section in your templates (so they will have access to the TV) to style your logo div with the background image TV:
    <style>
    #logodiv { background-image: url([[*logoImage]]);
    background-size: cover;}
    


    Snippets are for PHP code, much like the <?php ... ?> elements of inline PHP. They provide the dynamic content for each page.
    https://rtfm.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/using-snippets
    https://rtfm.modx.com/revolution/2.x/developing-in-modx/basic-development/snippets
    [ed. note: sottwell last edited this post 8 years, 4 months ago.]
      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
      • 3749
      • 24,544 Posts
        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
        • 46886
        • 1,154 Posts
        Snippets are the juice that make Modx so fun, they allow you to insert bits of code basically anywhere. Chunks on the other hand are mostly for convenience, pieces of html that can be applied to many places, especially across templates, so that when you need to change it, you only need to change one place. Like if you had two totally different templates on your site but they both have some elements in common, like maybe logo and phone number.
          • 3749
          • 24,544 Posts
          In less poetic terms: wink

          When MODX sees a snippet tag, it looks for a snippet with that name, runs the PHP code of the snippet, and replaces the snippet tag with whatever value the code 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
            • 51550
            • 12 Posts
            Guys, SOS, i am in a hurry *again* laugh

            I can't find how to edit the thing in the screenshot below.

            It displays some products, and i need to make them responsive, but i can't find the structure anywhere.

            Help pls :'(

            Best Regards,
            I would buy for each of you a beer if i could ;(
            itWorks
            • discuss.answer
              I presume that it's the "main tabs" section of the template. That is populated by a snippet, echoMainTabs. If the snippet is written correctly, it uses a mini-template, probably a chunk, for formatting each item. If it's not, the HTML formatting for each item is hard-coded in the snippet code.
                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
                Quote from: sottwell at Jan 04, 2016, 10:33 AM
                I presume that it's the "main tabs" section of the template. That is populated by a snippet, echoMainTabs. If the snippet is written correctly, it uses a mini-template, probably a chunk, for formatting each item. If it's not, the HTML formatting for each item is hard-coded in the snippet code.

                Yeah, you were right, i found what i need exactly on the place you mentioned upthere. Thank you so much, i elevated my work fast with your help guys, and that's awesome! :3


                I have another question, and this is a pretty stupid one i guess.


                So i have a chunk:
                <h2 class="green font35">[[%main_reviews? &topic=`staticfields`]]</h2>
                <div class="reviews module" id="reviews-module" >
                    <ul>
                        [[!QuipLatestComments? 
                            &type=`thread`
                            &thread=`Reviews`
                            &tpl=`template_lastComments`
                            &bodyLimit=`200`]]
                    </ul>
                    <a href="[[~[[%main_reviews_all_id? &topic=`staticfields`]]]]">[[%main_reviews_all? &topic=`staticfields`]]</a>
                    <a class="add-review" href="[[~[[%send_review_id? &topic=`staticfields`]]]]">[[%main_reviews_make? &topic=`staticfields`]]</a>    
                </div>
                


                And i need to find out where i can change the H2 in this code (the title displayed i mean)

                The webpage has 3 languages, so i am searching for like a hour where i change it.

                Best Regards and Thanks for all of your attention! :3
                  • 46886
                  • 1,154 Posts
                  What do you want to do to the H2? You got the code right there and the class= will connect with your CSS file.

                  For the Wayfinder, you mean you want to output more items? Usually in the snippet there is a variable for this, can you post your snippet?
                    • 51550
                    • 12 Posts
                    Hey!
                    That H2 is the title of a block, and i need to change it (the title)
                    And i can't find the place where i can do it :/
                      • 3749
                      • 24,544 Posts
                      I assume you mean this:

                      [[%main_reviews? &topic=`staticfields`]]


                      It's a language string. You can change it in the database under Lexicon Management -- System (gear icon) -> Lexicons, or in the lexicon file(s) if there are any.


                      Since there's no namespace specified in the tag, it could be in the core namespace under the 'staticfields' topic. You'd look for the 'name' (key) field: 'main_reviews' and set its 'value' field to whatever you want. There should be one entry for each language.

                        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