We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19328
    • 433 Posts
    The other question is: what do you want to happen if they type in domain.tld/open-sunday/location-A and it is NOT open on sunday?

    Ah, just had an aha-moment (is that an English expression as well? in Dutch it is ;-). Thank you!
    I see now that I'm doing it wrong: the way I set it up, all possible combinations of paths and aliases would 'work'. Also the ones that are incorrect (because location is not open on sunday, for example). That's not good. Probably also not good for ranking in Google. Hmm... This means that before a resource with corresponding alias is retrieved, the category has to be checked against the path, right? And this means the category-alias has to be the exact same as the option used in the checkbox TV. Getting complicated...

    Which option (adjust plugin or create new one) would be best do you think?
    And will this checking take a lot of loading time?

    About 3000. My Home Page loads 400+ resources at once.

    Wow, 3000, that's a lot!
      • 39932
      • 483 Posts
      ... just had an aha-moment (is that an English expression as well? ...

      Yup. It is, absolutely!

      I see now that I'm doing it wrong...

      Nope. You aren't doing it wrong, per se. You are doing it in steps. It's like starting your car. You can't do it all at once... you just have to figure out the order of steps. Some can be rearranged, some cannot. So, we have an alias (YAY!). Now, we determine if the alias is valid.

      That's not good. Probably also not good for ranking in Google.

      Not so! This is where the answer to the 2nd question I asked you is important. If you want the page to not exist, then you are correct. If you want the page "forwarded" to a "error" page, you can certainly offset this.

      It sounds like you want the page to not exist. Great!! This is not too bad. Let me ponder for a few minutes while I continue translating your page. smiley (I've been fixing the way Google is translating your page, just some subtleties, anyhow).

      Which option would be best do you think?

      In this case, it will be best to just adjust this plugin... So, simply adding a condition inside (after the alias has been retrieved, but before it has been forwarded) will take care of this. Before the adjustment is made, however, do you plan to use site-aliases for any other type of pages (or just locations)?

      Wow, 3000, that's a lot!

      Not when you consider that it will be a social network/marketing resource for software developers, their development teams, and the projects they are working on/have finished..
        Website: Extended Dialog Development Blog: on Extended Dialog
        Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
        Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

        Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
        • 19328
        • 433 Posts
        Nope. You aren't doing it wrong, per se. You are doing it in steps. It's like starting your car. You can't do it all at once... you just have to figure out the order of steps. Some can be rearranged, some cannot.

        You are right smiley Rome wasn't built in a day ;-)

        If you want the page to not exist, then you are correct. If you want the page "forwarded" to a "error" page, you can certainly offset this.

        So if I understand correctly, best approach would be to display an error page if a non-existing URL is typed in? This way, Google would understand that only the existing URL's are actual pages?

        Let me ponder for a few minutes while I continue translating your page. (I've been fixing the way Google is translating your page, just some subtleties, anyhow).

        What page are you translating? Oh, our website? And what did you fix in the way Google translates, this is making me curious ;-)

        In this case, it will be best to just adjust this plugin... So, simply adding a condition inside (after the alias has been retrieved, but before it has been forwarded) will take care of this. Before the adjustment is made, however, do you plan to use site-aliases for any other type of pages (or just locations)?

        Ok. Good question. Apart from the locations there is also a blog (with Articles) in the web context, that will be shared with the two other contexts. The path however could be the same in both contexts for the blog, it will either be just the homepage (www.domain1.com/article1, and www.domain2.com/article1) or maybe '/blog' or '/nieuws'. But it can be the same on both contexts.

          • 39932
          • 483 Posts
          ... there is also a blog ...

          OK. That's simple enough...

          ... best approach would be to display an error page if a non-existing URL is typed in? This way, Google would understand ...

          Bingo! This already kind of happens automatically anyway. But, we can force the issue for the locations...

          And what did you fix in the way Google translates?

          Little subtleties. The placement of commas in Dutch is different in English. English actually uses a few more commas. Your company name should be translated as two words (but Google translated it as one). Otherwise, I've just been reordering the phrases and clauses.

          Dutch is just similar enough in structure to throw it way off on particular sentences. One example is: Before I started I CMD ICT Management completed the training. This has all of the right words in completely the wrong order. But Google doesn't know this because it is mostly correct on the rest of the site.
            Website: Extended Dialog Development Blog: on Extended Dialog
            Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
            Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

            Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
            • 39932
            • 483 Posts
            OK. What I need in order to help you: I need the Template ID of your blog. I need a copy of your getResources with the TVFilter. And I need the Template ID of your Site-Alias. I may need more, depending on your TVFilter.
              Website: Extended Dialog Development Blog: on Extended Dialog
              Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
              Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

              Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
              • 39932
              • 483 Posts
              Your company name should be translated as two words

              ... That is, unless you want it to be one word for a trademark/corporate identity. However, it's two words in Dutch, so you probably want two words in English. That is entirely up to you. It is important to note that it can be either a) Meter(s) Squared or b) Square Meter(s).
                Website: Extended Dialog Development Blog: on Extended Dialog
                Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
                • 19328
                • 433 Posts
                Sorry, was out for lunch smiley

                It is important to note that it can be either a) Meter(s) Squared or b) Square Meter(s).

                Well, in Dutch 'Vierkante Meter' is just the way M² is pronounced. (I bet you already understood that it's based on our names both starting with an M). So the way M² would normally be pronounced in English would be the correct way to translate our name.

                Cool that you're making the translation better. And do you also send this improvements to Google?
                I always have to laugh when I'm google-translating for example a Russian or German MODX forum post, and the words 'snippet' and 'chunk' get translated as well, resulting in very funny sentences in Dutch ;-).

                Now on to the details of my site:
                - template ID of blog: container = ID 5, articles = ID 3.
                - getResources call with TVFilter:

                For the blog (each domain has a blog, with tvFilters only items for selected domain are shown:
                [[!getResources? &showHidden=`1` &parents=`12` &includeTVs=`1` &processTVs=`1` &context=`web` &tpl=`blogItemTpl` &debug=`1` &tvFilters=`blogCategorie==%domain1%`]]


                For the locations: (example with category Monday)
                [[!getResources? &showHidden=`1` &parents=`4` &includeTVs=`1` &processTVs=`1` &context=`web` &tpl=`locatieTpl` &debug=`1` &tvFilters=`locatieCategorie==%maandag%`]]


                Template ID of Site-Alias: 4. This template is used for the locations.

                Thank you for helping me out so much with this! It's so kind!
                  • 39932
                  • 483 Posts
                  And do you also send this improvements to Google?

                  Yup. It happens through their translate popup. I click "contribute". In other words, they tabulate the results that are submitted and pick the best one.

                  &tvFilters=`locatieCategorie==%maandag%`

                  Okay, I have a question: Since each category has a resource (with a list of all locations), are you using a TV on the category resource, as well? This would be optimal as when can create a query for that much more easily. That is, on the Monday category resource, have the TV equal %maandag% only.

                  Thank you for helping me out so much with this

                  You're welcome. I'm actually a software developer who has a lot of database and web design expertise (separately and jointly). So, I think about things a little differently than the majority of CMS users. It's actually why I use MODX. It allows me to be a programmer, not a designer. So, it allows me to find solutions that others might not think are possible, like this plugin.
                    Website: Extended Dialog Development Blog: on Extended Dialog
                    Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                    Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                    Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
                    • 19328
                    • 433 Posts
                    ]Yup. It happens through their translate popup. I click "contribute". In other words, they tabulate the results that are submitted and pick the best one.
                    Cool, didn't know that was possible!

                    Since each category has a resource (with a list of all locations), are you using a TV on the category resource, as well? This would be optimal as when can create a query for that much more easily. That is, on the Monday category resource, have the TV equal %maandag% only.

                    I'm not doing that now but I could do that, wouldn't be a problem.

                    it allows me to find solutions that others might not think is possible like this plugin

                    Very true! I wouldn't have thought of this myself. I think that's the great thing with MODX, you can use it as a designer without having to code a lot (for not so complex sites) and also do complicated stuff with it (well, if you're a /get help from a programmer ;-). People like you who post these solutions and pieces of code really help me understand what's possible and how to use MODX to it's full potential.
                      • 39932
                      • 483 Posts
                      I'm not doing that now but I could do that, wouldn't be a problem.

                      I think that would be best. Then we can do a comparison and "match" the previous segment's TV to see if it is in the alias's TV. Then you can keep what you have done, so far, but still add functionality based on these paths. (I do this a lot, except I match Template IDs and Parent Resource IDs).

                      So, make a TV for your category template. Set the TV equal to the one value in your locations that matches it. That is: Monday -> %maandag%, etc... Then I can write a quick query to the DB smiley

                      I also assume that each location may have multiple categories? i.e. Monday, Tuesday, Nights, etc..
                        Website: Extended Dialog Development Blog: on Extended Dialog
                        Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                        Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                        Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".