We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15309
    • 30 Posts
    HI,
    Can any one provide information on how to extend default fileds of modx content table (modx_site_content) and acces the extra fields just as present fields..
    I don’t want to extend it through Template Variables(TV), as almost all of my documents will have at least 5 fields each . so this will create a lot of rows in the TV table..

    can any one suggest some trick or hack to accomplish this.

    thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      No matter how you cut it, it’s going to put something in the database. TVs is the way to do what you are asking.
        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
        • 4041
        • 788 Posts
        If you are adding extra fields into the site content table:
        * go into phpmyadmin and add the needed fields
        * create a custom snippet that pulls the data and prints those fields
        * you will also need some sort of input area to populate the fields
          xforum
          http://frsbuilders.net (under construction) forum for evolution
          • 15309
          • 30 Posts
          Quote from: sottwell at Jul 30, 2008, 10:39 AM

          No matter how you cut it, it’s going to put something in the database. TVs is the way to do what you are asking.

          it matters. and a lot. it will save many queries and easy to manage the data archives as well. you don’t have to be dependent on the relational linking of rows and fields of different tables.
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: kamalsomani at Jul 30, 2008, 10:56 AM

            Quote from: sottwell at Jul 30, 2008, 10:39 AM

            No matter how you cut it, it’s going to put something in the database. TVs is the way to do what you are asking.

            it matters. and a lot. it will save many queries and easy to manage the data archives as well. you don’t have to be dependent on the relational linking of rows and fields of different tables.
            Why not just build your own PHP site management system if you don’t want TV’s and the site_content table doesn’t have what you need? You’re essentially hacking MODx here and will have to change a lot to follow any upgrade paths if you modify that table.
              • 15309
              • 30 Posts
              Quote from: OpenGeek at Jul 30, 2008, 11:10 AM

              Quote from: kamalsomani at Jul 30, 2008, 10:56 AM

              Quote from: sottwell at Jul 30, 2008, 10:39 AM

              No matter how you cut it, it’s going to put something in the database. TVs is the way to do what you are asking.

              it matters. and a lot. it will save many queries and easy to manage the data archives as well. you don’t have to be dependent on the relational linking of rows and fields of different tables.
              Why not just build your own PHP site management system if you don’t want TV’s and the site_content table doesn’t have what you need? You’re essentially hacking MODx here and will have to change a lot to follow any upgrade paths if you modify that table.

              Hope all of you have looked on WebloginPE.. it extends modx default signup fields with just adding few more columns to the extended table.. and i am looking for a similar kind of solution for the content table ..thats not hacking i hope..

              i feel modx is powerful enough to be that flexible.

              thanks for you use full comments..



                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Web login is not part of the MODx manager, nor is it part of the core. It’s a snippet, and all it does is create a new table for the extended attributes. It still uses the original web_users table as its base.

                Modifying the site_content table and the document management pages, on the other hand, will involve hacking core tables and scripts.

                What you want to do could be accomplished with a plugin without hacking the core scripts or tables. But don’t forget that in either case any front-end document editing or management scripts (NewsPublisher, QuickEdit) would not know about this.
                  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