We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44363
    • 14 Posts
    Hi,

    I am building a website where I am targeting more than 3000 universities. Each universities has its own courses, application downloads, photo gallery, Youtube video gallery and event calendar. Using the present tree structure I am finding it difficult to manage 50 universities and how can I handle 3000. Is there any way to handle this issue, any alternative suggestion.

    At present the tree structure is like this

    + University
    + Courses
    - Course 1
    - Course 2
    - Course 3
    - Course 4
    + Downloads
    - application 1
    - application 2
    - application 3
    - application 4
    + opendays
    - openday 1
    - openday 2
    - openday 3
    - openday 4
    + Youtube Video
    - Video 1
    - Video 2
    - Video 3
    - Video 4
    + User Rating
    - Rating by user 1
    - Rating by user 2
    - Rating by user 3
    - Rating by user 4

    Questions.
    1. Is this manageable using the present tree structure for 3000 universities
    2. Further I need to categorize based on country, Since it will be easy to search based on country and then find the university. How will I do this?
    3. Do I have to go for custom table to store data?

    Please let me know your valuable suggestions

    Thanks
    Shivanandan.L


    [ed. note: shivanandan last edited this post 10 years, 8 months ago.]
    • If it was me, I would look into a custom table(s) structure to handle this. Especially as I see your garnering user ratings which could themselves soon rack up to a few thousand resources I suspect.

      My first question is, how proficient are you at PHP programming? Only asking because if you went the custom tables route, you would most likely want to build out some kind of admin component for the data (whether that's a manager component or a frontend admin area) and also the frontend snippets etc. to access your data.

      If you wanted to stick with resources, my second question is, what is the kind of relationship between each 'categories'? For example, is it a one-to-one relationship between courses, applications and Youtube videos. You could maybe look into TVs to handle those to simplify the structure (or even MIGx if you had multiple Youtube videos per course for example). Still I think with 3000 universities, it might still be too unwieldy even then.
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 44363
        • 14 Posts
        Hello Garry,

        Thanks for your valuable suggestion!

        I am proficient in php. The relationship between each category is one to one. Do you mean that there are options if I go by custom table way. Is it possible to change the manager component to adapt my requirement.

        Thanks
        Shivanandan.L

        • So, at this point, I suggest you spend a few minutes having a look at a few things before diving into building a manager component. I think the custom tables route is still the best option but you will need to know a few of the basics going into this (knowledge of ExtJS, or another JS framework, but ExtJS offers the best integration with the MODX Manager and xPDO/PHP):


          • Bob's Guides (some great entry-level information for MODX Revolution and xPDO)
          • Case Studies and Tutorials in the MODX Documentation. Contains a few tutorials that would be useful when building a 3PC (third party manager component). Also check out the xPDO section in the documentation too.
          • Mark Hamstra's ClientConfig component on Github: https://github.com/Mark-H/ClientConfig - This is a working example of a very basic manager component, and one that can be easily deconstructed and modified to your own needs.

          If that's a bit heavy duty, you can still build out a custom table structure (create the xPDO data model by using this) and then build the admin portions out in the frontend with the tools of your choice.

          Lots of ways to go about this, so it's whichever you have time for/feel comfortable with going forward smiley
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
          • MIGXdb is a wonderful toolkit for working with custom tables and custom manager pages for managing them.

            http://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials
              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
              yeah, with MIGXdb its easy to create the Manager-page for that.

              you can have a searchable main-grid with all the universities and have for each category (courses, downloads, user-ratings, youtube-videos, opendays....) another table.

              than you can have a tab for each category inside the university-edit-window where you have another MIGXdb - grid to manage the related category-items.

              Not difficult to set up. [ed. note: Bruno17 last edited this post 10 years, 8 months ago.]
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 44363
                • 14 Posts
                My Sincere thanks to Garry, Sottwell and Bruno17 for responding and guiding me. I will have a look at MIGXdb which sounds great to solve my issue.

                Thanks
                Shivanandan.L
                  • 44363
                  • 14 Posts
                  Hello Bruno17,

                  I was successful in creating the gallery using MIGXdb. I understood the working concept of MIGXdb.
                  Still need your guidance:

                  Universities ( Group of TV variables, Uni_Name, Uni_Country, Uni_City, Uni_Website)

                  Using MIGXdb I am creating the custom sub tables for
                  1. Courses -> Course_name, Course_Duration, Course_Mode
                  2. Download -> Download_application, Download_application_Desc
                  3. YoutubeVideos -> Youtube_Video_URL, Youtube_description

                  University will have many courses (one to many)
                  University will have many Download (one to many)
                  University will have many youtube videos (one to many)

                  How do I set this in Custom Manager page?

                  Please help

                  Shivanandan.L



                    • 4172
                    • 5,888 Posts
                    I would put everything into custom-tables, also the universities with a xpdo-schema like that:

                    <?xml version="1.0" encoding="UTF-8"?>
                    <model package="universities" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM">
                    
                    	<object class="uvUniversity" table="universities_universities" extends="xPDOSimpleObject">
                    		<field key="name" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
                            <field key="country" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
                            <field key="city" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
                            <field key="website" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
                           
                    		<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                    		<field key="createdby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="createdon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="editedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="editedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                    		<field key="deletedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="deletedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="publishedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="publishedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    
                            <composite alias="Courses" class="uvCourse" local="id" foreign="university_id" cardinality="many" owner="local" />
                            <composite alias="Videos" class="uvYoutubeVideo" local="id" foreign="university_id" cardinality="many" owner="local" />
                            <composite alias="Downloads" class="uvDownload" local="id" foreign="university_id" cardinality="many" owner="local" />
                    
                    	</object>
                    
                    	<object class="uvCourse" table="universities_courses" extends="xPDOSimpleObject">
                    		<field key="name" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
                            <field key="duration" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
                            <field key="mode" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
                            
                            <field key="university_id" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                           
                    		<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                    		<field key="createdby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="createdon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="editedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="editedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                    		<field key="deletedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="deletedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="publishedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="publishedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    
                            <aggregate alias="University" class="uvUniversity" local="university_id" foreign="id" cardinality="one" owner="foreign" />
                    
                    	</object> 
                        
                    	<object class="uvDownload" table="universities_downloads" extends="xPDOSimpleObject">
                    		<field key="application" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
                            <field key="application_description" dbtype="text" phptype="string" index="fulltext" />
                            <field key="file" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
                            
                            <field key="university_id" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                           
                    		<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                    		<field key="createdby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="createdon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="editedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="editedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                    		<field key="deletedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="deletedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="publishedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="publishedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    
                            <aggregate alias="University" class="uvUniversity" local="university_id" foreign="id" cardinality="one" owner="foreign" />
                    	</object> 
                        
                    	<object class="uvYoutubeVideo" table="universities_youtubevideos" extends="xPDOSimpleObject">
                    		<field key="url" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
                            <field key="description" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
                            
                            <field key="university_id" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                           
                    		<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                    		<field key="createdby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="createdon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="editedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="editedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                    		<field key="deletedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="deletedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    		<field key="publishedon" dbtype="datetime" phptype="datetime" null="false" />
                    		<field key="publishedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
                    
                            <aggregate alias="University" class="uvUniversity" local="university_id" foreign="id" cardinality="one" owner="foreign" />
                    	</object>                         
                        
                    
                    </model>
                    


                    than create a MIGX - configuration for each of this tables with the needed formtabs and columns

                    in the university - formtabs i would create a tab for each of courses,downloads,vidoes
                    and put one field into that tab with

                    field: a non existing fieldname
                    inputTVtype: migxdb
                    configs: the migx-configuration-name for this table

                    in the other configurations be sure to have checkResource to yes
                    and make the table autoloading (not by button)
                    and joinAlias to 'University'

                    create a migx-CMP (see the MIGXdb - doodles - tutorial) for the universities - table

                    this should basically be what you need.

                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!