We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33968
    • 863 Posts
    Is the Namespace path correct? All I can suggest (without seeing all your code) is you need to comb through your code line by line and check for syntax errors, and ensure it matches the tutorial.

    You could alternatively search for and install the Doodles package (although I'm not sure how up to date it is), and compare that to what you've done. Or use that as a base for your custom component.
      • 39465
      • 14 Posts
      why bother doing it manually , just install doodles extra from package managment, and then check the structure and files needed..and modify it when needed. I done it manually and its a pain in the ass.:)
        • 33968
        • 863 Posts
        Quote from: yuka123 at Nov 23, 2012, 02:43 AM
        why bother doing it manually , just install doodles extra from package managment, and then check the structure and files needed..and modify it when needed. I done it manually and its a pain in the ass.:)
        I did it manually too. That's how I learned to build some pretty cool stuff smiley

        You just need to be careful about the details as you would with any programming project, and not give up if it doesn't work the first time.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I think it took me four tries to get it right. Then I discovered MIGx... http://rtfm.modx.com/display/ADDON/MIGXdb.Create+doodles+manager+with+help+of+MIGXdb
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 4172
            • 5,888 Posts
            .....and Susan does know about what she is talking.

            MIGXdb is made for you peoples who want to create CMPs with just some configurations.
            And if this existing configurations(there are a lot) are still not enough,
            MIGXdb is extentable with custom js-functions, custom processors complete custom grids or if you need so, also with complete custom panels.

            You can also trasport your custom configurations together with your package from one installation to another because all processors and configurations can be stored in your package-folder.

            You can create a complete new package with your custom- db - schema + create the tables from your schema + a simple CMP to manage your new table(s)(add/edit/remove/search records), I would say in about half an hour, if you have it done some times.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 39990
              • 45 Posts
              Thank you everyone for your help! I have spent some time with the MIGXdb plugin. It is a very valuable plugin! I have a few questions I haven't found the answers to in the tutorials... First, are there any tutorials that show how to use custom tables with MIGXdb? Second, with the table structure I have set up, I need to join a few tables together. I noticed under the MIGXdb-Settings that there are Join, Where and Joins fields. What is the syntax to join tables? Along with that, when I join the tables, both tables have to be in the Xml Schema, right?
                • 4172
                • 5,888 Posts
                Thank you everyone for your help! I have spent some time with the MIGXdb plugin. It is a very valuable plugin! I have a few questions I haven't found the answers to in the tutorials... First, are there any tutorials that show how to use custom tables with MIGXdb?
                you just need to modify the MIGX-doodles-tutorial for your own tables.
                For frontend - stuff you can use rowboat or bloX. BloX can handle also joins and other stuff out of the box or is very extendable.
                Need still to create some docs and Tutorials how to use bloX.

                Second, with the table structure I have set up, I need to join a few tables together. I noticed under the MIGXdb-Settings that there are Join, Where and Joins fields. What is the syntax to join tables?

                lets say, you have some aggregates like that in your schema:
                        <aggregate alias="Resource" class="modResource" local="category_id" foreign="id" cardinality="one" owner="foreign" />
                        <aggregate alias="User" class="modUser" local="user_id" foreign="id" cardinality="one" owner="foreign" />
                


                as soon, as you add this to the joins-field:

                [{"alias":"Resource"},{"alias":"User"}]


                all fields of the joined User and Resource are availiable in the grid
                they will have names like Resource_pagetitle or User_username

                you can also limit the selected fields by:

                [{"alias":"Resource","selectfields":"id,pagetitle,template"},{"alias":"User","selectfields":"id,username,active"}]


                or you can join to tables, which are not in your schema:

                [{"alias":"Template","classname":"modTemplate","on":"Template.template = myClass.template"}]



                Along with that, when I join the tables, both tables have to be in the Xml Schema, right?

                its easier, if they are in the same schema, but would also be possible, if they are in different schemas/packages
                its possible to have config-php-files with the same name as the configuration either in the migx-configs-folder or in a folder with name 'migxconfigs' in your package-folder, where you could add multiple packages.

                While I'm thinking about it, I could extend the code and load multiple packages by a commaseperated list in the packagename-field.

                Its of course also allways possible to have custom-processors. MIGXdb will first search in your package-folder for processors, first in a custom-subfolder, then in the default-subfolder, then in the MIGXdb - custom - folder, then in the MIGXdb - default-folder.
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 39990
                  • 45 Posts
                  I have tried to use my custom tables a few times, but I keep getting "No items found".



                  I have tried pulling the username and active columns from the modx users table and it worked perfect. Is there something I have to do to my custom tables to allow this to work? I have been using the Write Schema tab to generate my xml schema, so it shouldn't be because I wrote the schema wrong... right?

                  Thank you for your help!
                    • 4172
                    • 5,888 Posts
                    can you show your schema, I think the issue is to seek there anywhere
                    did you use a prefix as you did write schema?
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 39990
                      • 45 Posts
                      Here is the schema that was generated by MIGX for the table I am trying to display.

                      	<object class="CustomNews" table="custom_news" extends="xPDOObject">
                      		<field key="newsID" dbtype="int" precision="10" phptype="integer" null="false" index="pk"  generated="native" />
                      		<field key="departmentID" dbtype="int" precision="10" phptype="integer" null="false" index="index" />
                      		<field key="title" dbtype="varchar" precision="100" phptype="string" null="false" />
                      		<field key="short_description" dbtype="varchar" precision="500" phptype="string" null="false" />
                      		<field key="url" dbtype="varchar" precision="200" phptype="string" null="false" />
                      		<field key="news_date" dbtype="date" phptype="date" null="false" />
                      		<field key="active_yn" dbtype="varchar" precision="1" phptype="string" null="false" />
                      
                      		<index alias="PRIMARY" name="PRIMARY" primary="true" unique="true" type="BTREE" >
                      			<column key="newsID" length="" collation="A" null="false" />
                      		</index>
                      		<index alias="departmentID" name="departmentID" primary="false" unique="false" type="BTREE" >
                      			<column key="departmentID" length="" collation="A" null="false" />
                      		</index>
                      	</object>


                      Thank you so much for you help!!!!