We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42415
    • 115 Posts
    Currently my method to create pages only suits for a small site, for example I copy and paste the complete webpage html (including snippets or chunks) into a template (elements) and save it. Then I create a resource and select the saved template from here and click publish.

    I now want to create thousands of pages from fields already created in MIGXDB that will display content that is also stored in MIGXDB.

    There is a field called 'author' and this field will give the page name, for example:

    www.domain.com/mark-twain-quotes.html
    or
    www.domain.com/franz-beckenbauer-quotes.html

    Under author there is only the persons name, the word 'quotes' needs to be added to each page.

    The information to be displayed on the page will be a list from a field called 'quote'.

    Other fields that will need to be displayed on the page comes from the following fields:
    author
    topic
    birthday

    Is there a method I can use to achieve this?

      • 4172
      • 5,888 Posts
      why do you want to create resources for each dataset, if all the data you need is allready stored in the db?
      Can't you just pull the needed data into one view-resource?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 42415
        • 115 Posts
        Hi Bruno, thank you for the response.

        Can't you just pull the needed data into one view-resource?


        So create 10,000+ individual resources and call the data individually to each one?

        or

        Is it possible to pull the data into one resource that can in turn create individual pages as required?

        This is something I have pondered for a long time but I have not yet found any documentation explaining how this could be done.



          • 4172
          • 5,888 Posts
          You don't need 10000 individual resources.
          Just one View-Resource, where you show the individual item should do it.

          If you need friendly URLs for each item, put a alias or url-field to your custom-table to generate the url on listings.
          Then use a plugin, like the customRequest - plugin for the routing.

          Do you have an example for what you are after?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 42415
            • 115 Posts
            Just one View-Resource, where you show the individual item should do it.

            Actually this is the part I do not understand. I know it is possible to do this in MODX but I have never used this method. I have always put the html in a template and created a resource for every single page.

            What I want to do is create a page for every 'author' and then list all the items under 'topic' for that author.

            I cannot give an example for this in a single View-Resource because I'm not sure how to do it.
              • 4172
              • 5,888 Posts
              you have about 10000 Authors and you want one page for each author?

              ok.
              let's begin with the author-page.
              what would be the html of an author-page?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 42415
                • 115 Posts
                It would be the information in the author field.
                For example if there are 5 quotes by Elvis Presley there will be 5 author fields with the exact words Elvis Presley (the same author for each different quote). However only one html is required to be generated and the 5 quotes will be listed on the author page.
                (in the schema each quote is under the name 'quote')

                So the html required would come from the name Elvis Presley

                I want the html to read like this domain.com/elvis-presley-quotes.html

                If there is an author called Griff Rhys Jones (this is the content of the author field) the required html would be domain.com/griff-rhys-jones-quotes.html

                Every space between first, middle and last names would be replaced by a '-' and '-quotes' added to complete the html

                If the author has only one name like Madonna then the html required would be domain.com/madonna-quotes.html

                For some quotes there is only one author, but others quotes can have the same author for anything up to 20 quotes. [ed. note: jimmyjazz last edited this post 7 years ago.]
                  • 42415
                  • 115 Posts
                  On reflection I think my original question was flawed and maybe not placed in the correct forum topic.

                  I chose to post it here because I am using MIGXDB to input and save all the information but I think in reality the association to my question probably ends there.

                  If it was straight forward information retrieval from the database then it may have been an acceptable question on here, but I think what I am actually asking is not simple information field retrieval but actually something rather more complex that goes beyond the remit of what is acceptable to ask in a forum focusing solely on MIGX.

                  I am not trying to say Bruno or anyone else could not have answered this but what I am saying is I over stepped the mark in asking too much.

                  This website of mine is a labour of love and not a business and although I am restricted in my coding knowledge I am not restricted in my imagination.

                  So onwards and upwards and No Worries smiley