We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44314
    • 44 Posts
    I have revo 2.2.0pl installed and AdvSearch. In one of my documents i have a large table, so instead of dropping all the code for the tables directly into the documents' Content box, i placed the table code into a Chunk and then called the Chunk in the document. Is this the right approach? Since now, AdvSearch doesn't include any content from the table and it's important that it does. I don't know of any other way to do it, i haven't placed the table into a TV as the table only appears on one page, so the TV option doesn't seem appropriate. Any suggestions would be great. I'm sure this is something really simple but i'm still figuring the best way to set up a site in Revo. Hope this makes sense
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      Try uncaching the chunk? I've not worked with AdvSearch so I'm not sure why it wouldn't grab the contents of the chunk but it's worth a try.

      [[!$chunkName]]


      Infofar as using chunks in the content area, I'd say only do that if you will not be editing the chunk's content much, if ever. I do it when I want to prevent a client from editing the markup. Placing the table into a rich text TV for the client to edit is preferable if you do want them to be able to change it at all. To exclude it from any resource, simply leave the TV blank (no default), or you could create a separate template for that resource only and call up the TV. If you really want to use the same template as the other pages, you can use If or longhand conditionals in the template, although that will request to the database for every page and look for the condition (not ideal for every page).

      i.e.
      [[!If? &subject=`yourTV` &operator=`empty` &then=`` &else=`yourTV`]]


      I'd lean towards just templating that page separately. Sometimes, it's simpler to do that than mess with conditions and try to use a single template everywhere.
        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
        • 44314
        • 44 Posts
        Thanks for the advice. I definitely don't want the client to have access to the table since it's not likely to change much if at all. I tried the options you suggested and creating another dedicated template just seemed the best solution. When you provided your chunk example, i notice you placed '!$' in front of the chunk name.. And in MODx it shows it as just the '$' in front. And i had it written as just the '!' sign in front. What's the difference? In any case, for some reason AdvSearch will not search in the chunk content no matter how it's written, hence me now using a separate template, but just thought i'd ask about those characters in front of the chunk name.
          • 44314
          • 44 Posts
          Update: i've only just noticed that placing the table inside a dedicated template doesn't work either; AdvSearch obviously only works in searching content of resources.
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            Try SimpleSearch then. Still it seems odd that AdvSearch doesn't get the content of the chunk. Having not used it before, I can't really comment though.

            The ! that you're referring to was in reference to uncaching the chunk, which would mean that every time it's processed by MODX it would be not cached. Chunks don't usually change, so they are rarely uncached, however I've had to uncache them when using modal window chunks before so I figured it was worth a try to get the results you wanted.

            see http://rtfm.modx.com/display/revolution20/Tag+Syntax

              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
              • 44314
              • 44 Posts
              Ah, i see, the ! is for uncaching. On a side note / last question (separate post required?), my host has a great one-click install feature which set up MODx revolution 2.2.0pl in seconds. I went to upgrade to 2.8 which would be the traditional install, but i noticed that on my hosts one-click install, this used an advanced install. So i have hesitated to upgrade wondering if this would cause a conflict if i do upgrade. Does it matter that i'd be doing an upgrade using a traditional install when the original install / set up by my host used an advanced method?
                • 10208 ☆ A M B ☆
                • 1,780 Posts
                Yes, you'll want to grab the Advanced version instead of the traditional for the upgrade and follow the instructions in the rtfm for advanced upgrades. You will have to manually push the update's files into the proper location on your server. Traditional installs of MODX place the core folder in the web root, while the advanced method places it elsewhere which provides for a more secure installation.

                While it's great that the one click install did the advanced method, one has to wonder about two things... they installed 2.2.0 which is quite "elderly", yet they don't offer a one click upgrade? Tsk tsk tsk... Naughty hosting.

                  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
                  • 44314
                  • 44 Posts
                  While it's great that the one click install did the advanced method, one has to wonder about two things... they installed 2.2.0 which is quite "elderly", yet they don't offer a one click upgrade? Tsk tsk tsk... Naughty hosting.

                  That's an obvious and valid point that i think entered my head briefly before i moved onto the different path of trying to upgrade it myself. I'm writing to the host to raise this issue with them, and i'm actually quite hopeful they'll address it, which is unusual for many host companies. In the meantime, i take onboard your points and upgrading myself in this situation is well outside my experience. I'll leave that for another time!