[MODx] Build a CMP (Custom Manager page) using MIGX in MODX 2.3--1

Source: Internet
Author: User
Tags modx

BIG Fuck for MODx

MODx document is not the good ... at least in my opint of view. I spend hours to search martirals to the find out what to build a CMP by using MIGX in MODX 2.3. The Officail Doument is written for 2.2, but since 2.3, it changed a lot.

OK, that's how-to does this shit ...

You can check those vedios:

Https://www.youtube.com/watch?v=Dv83iC9iELI (How to setup CMP in MODx 2.2)

Https://www.youtube.com/watch?v=LPJQrsiDdQ4 (changes in 2.3)

1. INSTALL MIGX (Do it Yourself)

2. Create Package: Package Name: serialnumber; talbe-prefix: serialnumber

3. Go xml-schema tab:

<?XML version= "1.0" encoding= "UTF-8"?><Model Package= "SerialNumber"BaseClass= "Xpdoobject"Platform= "MySQL"Defaultengine= "MyISAM"Phpdoc-package= "SerialNumber"Phpdoc-subpackage= "Model"version= "1.1">  <Objectclass= "Serials"Table= "Serial"extends= "Xpdosimpleobject">    <FieldKey= "Serial_no"DbType= "varchar"Precision= "+"Phptype= "string"NULL= "false"default=""Index= "Index" />    <FieldKey= "Material_no"DbType= "varchar"Precision= "+"Phptype= "string"NULL= "false"default="" />    <FieldKey= "description"DbType= "text"Phptype= "string"NULL= "true" />    <FieldKey= "Download_count"DbType= "int"Precision= "Ten"Phptype= "integer"NULL= "false"default= "1" />    <Indexalias= "Serial_no"name= "Serial_no"Primary= "false"Unique= "false"type= "BTREE">        <columnKey= "Serial_no"length=""Collation= "A"NULL= "false" />    </Index>    <Compositealias= "Oddownloads"class= "Oddownloads"Local= "Serial_no"Foreign= "Serial_no"cardinality= "many"owner= "local" />    <Compositealias= "OdLog"class= "OdLog"Local= "Serial_no"Foreign= "Serial_no"cardinality= "many"owner= "local" />    <Compositealias= "Odfiles"class= "Odfiles"Local= "Serial_no"Foreign= "Serial_no"cardinality= "many"owner= "local" />  </Object></Model>

4. Go "Parse Schema" tab and click "Parse Schema" button.

5. Go "Create Tables" tab and click "Create Tables" button.

6. You can now check the things, make sure everything wokrs fine:

    • Go to phpMyAdmin, find your table ' serialnumberserial '
    • Go to "Files"--"core"--"compoments"--"serialnumber"--"model"

You'll see the like this:

7. In "MIGX Management"--"MIGX" tab--click "ADD Item":

8. In "Settings" tab, add following information.

    • Name:serialnumber
    • "Add Item" Replacement: "Add a Serial"
    • Unique MIGX Id:serilanumber (remember this, later would use)

9. Go to "cmp-settings" tab, add following informations:

Go to "Migxdb-settings", add following informaiton:

Because when we create the ' package ' in step 2, we cadd the custom prefix ' serialnumber ', so here's also need to add it.

You should is able to the find those information in step 3.

Click "Done", save the changes. Then you'll see:

You might has different number, but anymore, the changes is saved.

Go to "System"--"menu":

Click the "Create Menu" button.

Fill in the following information:

You can leave the "Parent" field behind for now.

"Parameters": "SerialNumber" is a unique MIGXID you set in step 8.

Can drag & drop the menu just created to anywhere you want, for example:i put it under ' Extras '

Refresh the webpage, on the top menu, under ' Extras ', you'll see:

Click "SerialNumber", Nav to the CMP.

Okokok, mother Fucker!!! This is the first step (important) of want to achieve for CMP.

[MODx] Build a CMP (Custom Manager page) using MIGX in MODX 2.3--1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.