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

BIG FUCK for MODx



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

OK, that‘s how to do this shit...

You can check those two 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">
  <object class="Serials" table="serial" extends="xPDOSimpleObject">
    <field key="serial_no" dbtype="varchar" precision="32" phptype="string" null="false" default="" index="index" />
    <field key="material_no" dbtype="varchar" precision="32" phptype="string" null="false" default="" />
    <field key="description" dbtype="text" phptype="string" null="true" />
    <field key="download_count" dbtype="int" precision="10" phptype="integer" null="false" default="1" />
    <index alias="serial_no" name="serial_no" primary="false" unique="false" type="BTREE">
        <column key="serial_no" length="" collation="A" null="false" />
    </index>
    <composite alias="odDownloads" class="odDownloads" local="serial_no" foreign="serial_no" cardinality="many" owner="local" />
    <composite alias="odLog" class="odLog" local="serial_no" foreign="serial_no" cardinality="many" owner="local" />
    <composite alias="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 two things, make sure everything wokrs fine:

  • Go to phpmyadmin, find your table ‘serialnumberserial‘
  • Go to "Files" --> "core" --> "Compoments" --> "serialnumber" --> "model"

You will see 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 will use)

9. Go to "CMP-Settings" tab, add following informations:

10. Go to "MIGXDB-Settings", add following informaiton:

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

You should be able to find those information in step 3.

11. Click "DONE", save the changes. Then you will see :

You might have different number, but anymore, the changes are saved.

12. Go to "System" --> "MENU":

13. Click "Create Menu" Button.

14. Fill in the following information:

you can leave "Parent" field behind for now.

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

15. You can drag & drop the menu you just created to anywhere you want, for example: I put it under ‘Extras‘

16. Refresh the webpage, on the top menu, under ‘Extras‘, you will see:

17. Click "Serialnumber", nav to the CMP.

OKOKOK, mother fucker !!! This is the first step (important) you want to achieve for CMP.

时间: 2025-01-11 00:03:36

[MODx] Build a CMP (Custom manager page) using MIGX in MODX 2.3 -- 1的相关文章

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

We are not finishing yet... 1. Under MIGX Management, we need to add some "Actionbuttons" 2. Also some "contextmenus": 3. Add some 'columns' to the forms, the fields of the columns should match the fields in database (or xml schema): F

在ASP.NET Core使用Middleware模拟Custom Error Page功能

一.使用场景 在传统的ASP.NET MVC中,我们可以使用HandleErrorAttribute特性来具体指定如何处理Action抛出的异常.只要某个Action设置了HandleErrorAttribute特性,那么默认的,当这个Action抛出了异常时MVC将会显示Error视图,该视图位于~/Views/Shared目录下. 自定义错误页面的目的,就是为了能让程序在出现错误/异常的时候,能够有较好的显示体验.有时候在Error视图中也会发生错误,这时ASP.NET/MVC将会显示其默认

GHOST CMS - 创建自定义主页 Creating a custom home page

创建自定义主页 Creating a custom home page 为你的网站创建一个自定义的主页是一个让你从人群中脱颖而出的好方法,并把你自己独特的印记存放在你的网上.本教程向您展示了如何在Ghost中自定义和开发自己的自定义主页. Creating a custom home page for your site is a great way to set yourself apart from the crowd and put your own unique stamp on you

Gradle Goodness: Add Incremental Build Support to Custom Tasks with Annotations

In a previous post we learned how we can use the inputs and outputs properties to set properties or files that need to be checked to see if a task is up to date. In this post we learn how a custom task class can use annotations to set input propertie

SPJS Upload for SharePoint: Custom upload page for uploading documents to various document libraries in a site collection

http://spjsblog.com/2013/12/08/spjs-upload-for-sharepoint-custom-upload-page-for-uploading-documents-to-various-document-libraries-in-a-site-collection/?utm_source=tuicool http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputili

SharePoint 2013 Deploy Master Page And Page Layout

2013年9月27日的一篇随笔,其实也是自己编写的部署文档,由于客户是HK的,所以描述部分是用英文. 涉及到的内容是关于SharePoint 2013如何部署自定义的母版页和布局页. First, Login to site collection by site collection administrator, and we should click the menu of "Site collection features" in "Site Collection Adm

Enhancing Android UI with Custom Views 通过自定义view来让你的UI更屌!

Enhancing Android UI with Custom Views (通过自定义view来让你的UI更屌) Table of Contents: Custom View View Measurement View Drawing Custom Attributes Custom ViewGroup ViewGroup Measurement Layout ViewGroup Drawing More Custom Attributes There are many great adva

Oracle Applications Multiple Organizations Access Control for Custom Code

文档 ID 420787.1 White Paper Oracle Applications Multiple Organizations Access Control for Custom Code Checked for relevance on 12-JAN-2011 See Change Record This document discusses how to update the customization code that is affected by the access co

OpenWrt&#39;s build system

https://wiki.openwrt.org/about/toolchain Table of Contents OpenWrt build system – Features OpenWrt build system – Make Targets OpenWrt build system – Build sequence Patch management Packaging considerations Documentation History OpenWrt's build syste