We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36788
    • 75 Posts
    There is also one more question. How can I drop the custom generated urls back to the default vaules? At the moment the clearance of all rules with following urls regeneration does not help.
    The only solution I found was to use [[+cu.parent_uri]]/[[+alias]] rule and regenerate the urls.
      • 43114
      • 12 Posts
      Thanks for great add-on.
      But I can't understand, why alias generated from page title?

      Why not just take the data from the relevant field?

      Thx.
        • 34078
        • 76 Posts
        Hi,

        @sladdals

        If "catalog" is a resource without parent, I think you can remove it from its direct children URIs (category, category2, category3) by creating that rule :

        • Pattern : [[+alias]]
        • Constraint field : parent
        • Constraint : *catalog_id*
        • URI, Override, Active : Yes

        And for other resources, generate default URIs :

        • Pattern : [[+cu.parent_uri]]/[[+alias]]
        • Constraint field :
        • Constraint :
        • URI, Override, Active : Yes

        Else, you can define your own snippet to generate your custom urls :

        • Pattern : [[your_snippet]]
        • Constraint field :
        • Constraint :
        • URI, Override, Active : Yes

        Besides, at the moment, you're right, the only way to set default URIs is to create a rule with [[+cu.parent_uri]]/[[+alias]].
        But it's a good idea, I think I will add a button to clear custom URIs in next release.

        @tedlegendary

        It's the MODx default behavior. Aliases are made from resources pagetitle. It's more convenient for your customers who don't want specify aliases.
        In CustomURLs, if you use [[+alias]] in your pattern and set "Override" to "No", then aliases will not be overriden if they are specified :

        • Pattern : [[+alias]]
        • Constraint field :
        • Constraint :
        • URI : No
        • Override : No
        • Active : Yes

        I hope my english isn't too bad to be understood. wink [ed. note: ben_omycode last edited this post 10 years, 11 months ago.]
          • 36788
          • 75 Posts
          Quote from: ben_omycode at Apr 22, 2013, 05:18 PM
          Hi,

          @sladdals

          If "catalog" is a resource without parent, I think you can remove it from its direct children URIs (category, category2, category3) by creating that rule :

          • Pattern : [[+alias]]
          • Constraint field : parent
          • Constraint : *catalog_id*
          • URI, Override, Active : Yes

          And for other resources, generate default URIs :

          • Pattern : [[+cu.parent_uri]]/[[+alias]]
          • Constraint field :
          • Constraint :
          • URI, Override, Active : Yes

          Thank you!!! this helped a lot!

          The only thing I've noticed is that the last rule ignores container suffix which is "/" by default. E.g. it generates url for containers as "category2/subcategory2" or category2/subcategory2.html depending on the content type settings (html/js etc.)instead of "category2/subcategory2/".
            • 36788
            • 75 Posts
            Hi Ben, I'm using import form XLS file to create resources in site tree. And found that every time I'm importing resources, I need to regenerate urls manually from the plugin. I'm wondering if there is any possibility to configure the plugin to make it automatically?
              • 44611
              • 1 Posts
              Hello.
              Set CustomUrls, but it does not work with nginx. What rewrite rules you need to finish?
                • 19328
                • 433 Posts
                Hi, thanks for this addon! I'm trying to exclude all resources with a specific template (ID 3) from all alias paths. Is that possible with CustomUrls?

                I tried the following 2 rules together:

                #1
                pattern: [[+cu.parent_uri]]
                constraint field: template
                constraint: 3

                #2
                pattern: [[+cu.parent_uri]]/[[+alias]]
                constraint field: template
                constraint !3

                I added the second rule (don't know if you can exclude a template like that) because the first one wasn't working on its own. But the two rules together also don't work.

                Can I exclude all resources with a specific template with one rule or is it not possible with CustomUrls? If it's possible, what should I do to make it work?

                Thank you!
                  • 54048
                  • 1 Posts
                  Hello, specifically are registered to add a comment. Please add Russian localization (language) to your component. I have it completely translated. This localization is available at the link https://yadi.sk/d/ZbYsmNOD3SGQmk thanks in Advance. PS: the Russian-speaking community will thank You!!! This review was written using a translator, I apologize for any inaccuracies in this comment. I will also attach the original text of this comment.


                  Здравствуйте, специально зарегистрировался чтобы добавить комментарий. Добавьте пожалуйста в Ваш компонент Русскую локализацию (язык). Я его полностью перевел. Эта локализация доступна по ссылке https://yadi.sk/d/ZbYsmNOD3SGQmk Заранее спасибо. P.S.: Русскоязычное сообщество скажет Вам спасибо!!! Этот комментарий писал через переводчик, прошу прощение за неточности в этом комментарии. Также прикреплю оригинальный текст этого комментария.