We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49515
    • 184 Posts
    To reply #38, the problem was a Template Variable.
    Fixed with simple HTML editing. The template variable field box is so small that I can only read 2 lines of 15 characters wide.

    So, now I'm back to the main issue, the 1 MODX page with WordPress text in it.
    The page shows 6 Navbar tabs and top banner wrong text, compared to the other webpages with 7 Navbar tabls and top banner globally identical text.

    I think the MODX upgrade somehow pulle up an old WordPress file, rather than a current WP file?
    • MODX updates don't affect your resources in any way. There are no files associated with "pages" (resources) in MODX (unless the resources are "static resources" in which case, the file path will show instead of the content field), as all of your site content lives in the database . So no, the update is not to blame for the weird page.

      The only way MODX can display a WordPress page in the front end is if the resource is a weblink, linking to a separate WP site's page (or any other url) or with the raw HTML output from a WP site, maybe as a static resource, perhaps in the template or even the content field. However that would not be a dynamic WP page but rather a copy of a WP page taken at some point. Otherwise, the page with the content from WP, is likely simply a resource that somehow contains copied content from the WP site.

      Menus are usually generated with Wayfinder or getResources, and in general the site's resource tree structure will be what shows in menus. That doesn't mean that your menus are done in this way, as MODX can of course also display straight HTML. Generally your templates will tell you quite a lot about how the site is made.

      What template is this 1 page that has a missing menu item using? Is it the same as the other pages? In the template, you'll probably find what is generating the menu. Assuming a different template is being used, what is different about the snippet that generates the menu?

      Again, some code examples would help greatly. Without that, it's all a guess of what "could be" because there really is no single way to do anything in MODX. MODX is less about rules than flexibility and creative freedom.
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 49515
        • 184 Posts
        Thanks.
        I have searched through MODX manually and with the Search function.
        I pulled the website to my local git directory to $ grep the top banner's text, but no results.

        How can I find the links between Resources/webapges and Elements/chunks? I'm trying to find where a top banner populates text. A MODX search doesn't find the text?
        Since the MODX upgrade, the 1 page still isn't right.
        I think the webpage uses like a MODX background template and then the WordPress is linked into the page to display content.
        I have rebuilt all of the WordPress and linked it to the MODX page, so the content is showing correctly.
        However the MODX part of the page to show the global banner, Navbar etc... still is wrong.
          • 49515
          • 184 Posts
          So, I don't understand the structure of MODX.
          I have a webpage which uses a base template.
          Within this Base template, is a link to a title or something else.
          I can't find where the title or something else is populated with desired text?
          A MODX search doesn't give any results of the text.
            • 3749
            • 24,544 Posts
            Paste the title link from the template here. Be sure to enclose it in code tags using the <> icon above.
              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
              • 49515
              • 184 Posts
              MODX > Dashboard > Elements > Chunks > Contents > Common > webPageFill (6) > Create/edit chunk > Chunk code (html):
              <h2>Header2</h2>
              [[!getResources? &parents=`4` &tpl=`header_event` &limit=`1` &includeTVs=`1` &sortbyTV=`date_event` &sortdirTV=`DESC`]]

              I think the above code refers to the below webPage (4).

              MODX > Dashboard > Resources > web > webPage (4) > Document > Content:
              <p>[[!getResources? &parents=`[[*id]]` &tpl=`event_list` &includeTVs=`1` ]]</p>

              [ed. note: eiger3970 last edited this post 9 years, 3 months ago.]
                • 3749
                • 24,544 Posts
                None of that would produce an image and it's not a tag in the template, it's the content of a chunk, and it's not in code tags so it's difficult to read.

                  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
                  • 49515
                  • 184 Posts
                  Ok, so now I'm closer but still haven't found where the code is?
                  Unbelievably convoluted compared to a CLI grep search.

                  I looked in Browser > Website > webpage > right click > Inspect element > found HTML code that effects the header font.
                  Then went to MODX > Dashboard > Elements > Base Template > Base Template referred to header_event > header_event only has this code
                  <div id="calendar">
                                  <div class="month">[[+tv.event_date:strtotime:date=`%b`]]</div>
                                  <div class="day">[[+tv.event_date:strtotime:date=`%d`]]</div>
                                  </div>
                                  <div class="description">
                                  <p><strong>[[+pagetitle]]</strong><br/>[[+introtext:ellipsis=`150`]] <a href="[[~[[+id]]]]">More details</a></p>
                                  </div>
                  


                  I still can't find the header code that MODX controls to globally fill all the website pages?

                  Yes, I tried MODX search, and it rarely gives me a result. [ed. note: eiger3970 last edited this post 9 years, 3 months ago.]
                    • 3749
                    • 24,544 Posts
                    Please, please, when you post code, select it with your mouse and click on the "code" icon in the Forum message entry toolbar. The icon looks like this:

                    <>


                    For your problem, try this:

                    Find a resource (page) that shows the header you're looking for.
                    Edit that resource in the Manager and see what the template is.
                    Edit that template and look for tags like this:

                    [[$something]]


                    The name in the tag is the name of a chunk. Look at the chunks in the Element tree under the Chunks folder. In each chunk, look for the header or for other chunk tags. If there are other chunk tags, look for the header in them.
                      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
                      • 49515
                      • 184 Posts
                      Ok, thank you.
                      I went back and modified my posts to add code tags.
                      Checking the problem now.