Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of creating a New Model in phpcms

Shulou Source: shulou.com Published: 2022-06-02 05:20:02 10月25日 Update

This article will explain in detail the method of building a new model of phpcms for you. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

How does phpcms create a new model?

Log in to the PHPCMS backend and select manage content (top navigation)-- Model management (bottom left navigation)

Related recommendation: phpcms tutorial

Select add model, pop-up window, fill in according to your requirements, here I write the test model, click OK to save

After the model is added, click Field Management-add Field

Add the field name you need in the pop-up window. The type of input, etc.

After clicking OK, you will see that the field has been added.

Then start to modify, click content-column Management, and select the column to change the model. Note here that the column model can be modified only when the data in the column is 0. Here I have added a new column for the content model.

Select the column, modify, select the column model we just added in the column model drop-down tab, test the model, and make sure to save it.

OK, let's add an article to this column to see if the new model works. See, the new model works.

Matters needing attention

Note that when changing the column model, the column data must be 0 before it can be replaced.

Add moreinfo=1 when calling the custom model, and call the model field in English

This is the end of the method of building a new model for phpcms. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Models columns fields selection content management articles methods data more navigation testing good practical next items names background tutorials articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB macOS Shulou Technology Linux Apple