We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5091
    • 332 Posts
    I am new to Modx (but have done 2 sites with Etomite therefor it was easy for me to get started), and is having difficulty to implement the tagcloud/ tagcloudinc snippet.

    In a page where there are hundred of stores listing, what I want to do is to use pre-defined words (cities and states), and I only want the tagcloud be in that page. I setup a new template for that page (ID=8), but it shows me this :

    PHP error debug
    Error: Invalid argument supplied for foreach()
    Error type/ Nr.: Warning - 2
    File: /home/.freckles/mydomain/mydomain.com/manager/includes/document.parser.class.inc.php(748) : eval()’d code
    Line: 43

    In the template I have this parameter inserted:
    [[TagCloudInc? parent=`0`&min=`3`&landing=`8`]]

    Can a kind soul helps check my page to see what I did wrong. I am totally clueless and no idea how to go about implement it.

    Thanks!

    tgp
      • 11975
      • 2,542 Posts
      Hi

      I’ve never used tagCloudInc so could not help you about its settings

      But you snippet call has an extra space beetwen the ? and the first param

      try with:
      [[TagCloudInc? &parent=`0`&min=`3`&landing=`8`]]

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 5091
        • 332 Posts
        Hi,

        I tried

        [[TagCloudInc? &parent=`0`&min=`3`&landing=`8`]]
        [[TagCloudInc? parent=`0`&min=`3`&landing=`8`]]

        [[TagCloudInc?&parent=`0`&min=`3`&landing=`8`]]
        [[TagCloudInc?parent=`0`&min=`3`&landing=`8`]]
        [[TagCloudInc?parent=`1,3,5,6,7,14`&min=`3`&landing=`8`]]

        All gave me same error message. I first tried using TagCloud 1.1, same error too. In the snippet, there is "<?" at the end of the first line that looks odd to me,
        "/****************************************************<?

        so I compare it withother snippets already in the system, I don’t see that. I removed it to see if it makes any differences. None. Both TagCloudInc and TagCloud 1.1 have it, but not TvTagCloud.

        Could someone be so kind login to my admin to see what goes wrong? Many thanks!


        tgp
          • 5091
          • 332 Posts
          I think I might have missing an important parameter, but I am not sure how to go about doing it. In the instruction:

          landing: the id of your search result page. If you don’t have one, create it like: [!FlexSearchForm?FSF_showResults=`1` &FSF_showForm=`0`!]


          The document ID where I want the tagcloud and result show is ’8’. In my template, I have the TagCloudIn parameter placed in a div block, just like the way where I want the WayFinder shows. I am guessing the reason the error appears is because I didn’t have the parameter inserted for the landing of the search result. This makes sense, but firstly what I don’t understand is why it’s called [!FlexSearchForm?FSF_showResults=`1` &FSF_showForm=`0`!] or is it just an example? This is very confusing to me.

          This is the page where i want the tagCloudInc be, right now another template without tagcloudinc is used so that I can show you:
          http://lotusseeds.com/index.php?q=stores.html

          What I want is to have the tag clouds words appear In the "meet us at ...’ section, and I want the result be in the content area, they are all wrapped in the <div id="right">...</div>

          The markup for that section :

          <div id="right">
          <div id="announce">[[TagCloudInc?parent=`0`&min=`3`&landing=`8`]]</div>
          [*#content*]

          </div>

          Apart from the php parsing error, the concept I need to understand is, I want both tagcloud and results show in the same, how exactly do I make it happen? I am thinking I need to create a new document, make it unpulished, and put all stores listing in that page, and the id for it is ’16’; then in ’8" landing page, I have the

          [!FlexSearchForm?FSF_showResults=`1` &FSF_showForm=`0`!]

          insert in the ’document content’ area, and the parameter for TagCloudInc will be something like this:

          <div id="announce">[[TagCloudInc?parent=`16`&min=`3`&landing=`8`]]</div>

          I tried, it didn’t work. I am still getting the same


          MODx encountered the following error while attempting to parse the requested resource:
          « PHP Parse Error »

          PHP error debug
          Error: Invalid argument supplied for foreach()
          Error type/ Nr.: Warning - 2
          File: /home/.freckles/lotusseeds/lotusseeds.com/manager/includes/document.parser.class.inc.php(748) : eval()’d code
          Line: 43






            • 5091
            • 332 Posts
            Hi, really appreciate if someone can point me to a right direction. I already search the forum archieve and the WIKI, couldn’t find answer.

            Thanks!

            tgp