We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17723
    • 221 Posts
    I think I have found the answer.
    I've used an iframe ...
    In my iframe I'm passing the id value like this:
    <iframe src="[[~123? &p=`[[*id]]`]]" > </iframe>

    and resource 123 has just this content:
    [[!addToCookieList? &value=`[[!getUrlParam]]` ]]

      Lucas from AroundCyprus.net
    • You could build a custom ajax solution to trigger the adding/removing.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 35814
        • 7 Posts
        i really like cookieList, but I can't figure out how I can remove an item directly from the list i get via the getCookieList-Snippet...

        I appreciate every kind of help smiley

        TIA,
        Gerald

        EDIT: i have the getCookieList-Snippet in the sidebar (Chunk: aside) and the list is empty on every other site except the site the cookie was set with the addToCookieList-Snippet. Is it meant to work like this? [ed. note: Relias last edited this post 11 years, 7 months ago.]
        • Seems like a job for addToCookieList snippet ;-)

          You might want to check the documentation

          Hope that will help
            • 9995
            • 1,613 Posts
            Why isn't it showing any results?

            On productpages:
            <p>Wishlist: [[!addToCookieList? &addText=`Add` &removeText=`Remove` &value=`[[*id]]`]]


            When I check my browser cookies they look oké to me.

            On my wishlist page:
            [[!getResources?
            &tpl=`wish-list`
            &resources=`[[!getCookieList]]`
            &includeTVs=`1`
            &tvPrefix=``
            ]]

            Chunk wish-list:

            <p>test: [[+pagetitle]]</a>

            Doesn't matter what I try, It keeps being empty, even after using basic calls.

            ###

            There must be a friendly url bug? It did something when setting friendly url off but not the way it should work. Did see 1 result but where should have been more, removing wasn't possible. Anyway I need it to work with Friendly url on. Anyone got it working? [ed. note: fourroses666 last edited this post 11 years, 1 month ago.]
              Evolution user, I like the back-end speed and simplicity smiley
              • 36996
              • 211 Posts
              I have it working on one website.
              One difference I noticed in my case is &parents=`-1` in the getResources call.
                • 9995
                • 1,613 Posts
                It just doesn't work with me sad

                [[!getCookieList]]
                is blank.
                Did you do any other "hacking"?
                  Evolution user, I like the back-end speed and simplicity smiley
                  • 9995
                  • 1,613 Posts
                  Did this: http://forums.modx.com/thread/71914/cookielist---wishlist-favorites-addon-for-revolution-using-lovely-cookies#dis-post-426635

                  Then it works on rootresourses, not on resources which are into a container.
                  On a site with 2.2.2pl it works with a container without any changes, on 2.2.6 it doesn't (yet!) somehow.

                  Anyone?
                  [ed. note: fourroses666 last edited this post 11 years, 1 month ago.]
                    Evolution user, I like the back-end speed and simplicity smiley
                    • 22840
                    • 1,572 Posts
                    Is it possible to have a default text for the getCookieList results, for example if none have been added it would display "nothing added yet" and then when one is added that disappears ?
                      • 12028
                      • 152 Posts
                      Maybe something like this:
                      [[!getCookieList:isnot=``:then=`
                          <p>What you will show...</p>
                      `:else=`
                          <p>Nothing added yet!</p>
                      `]]
                        - A small step for mankind, so why not take two...

                        Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!