· The cloud calling ability of cloud development enables users to quickly call the open ability of wechat without authentication, greatly saving the development cost. Now, the long-awaited CMS content management system for cloud development is finally online! Incidentally, the next can also be secondary development oh!

What is a CMS management system for cloud development?

CMS content management system is an extension program provided by cloud development. It can be installed in your own cloud development environment with one click on the cloud development console, facilitating developers and content operators to manage small programs/Web and other multi-terminal cloud development content data anytime and anywhere. It can be used without writing code, and also provides PC/mobile browser access support, supporting visual editing of text, rich text, pictures, files, association types and other types.

Let’s take a look at what cloud development CMS looks like

First of all, let’s take a few screenshots to intuitively feel the CMS content management system extension:

Figure 1 Screenshot of the installation interface of the cloud development console

Figure 2 CMS content management system interface demonstration of installing and configuring content

Figure 3 Mobile terminal demonstration of CMS content management system interface

What are the features of CMS content management system for cloud development?

features introduce
Free development Generate a content management interface based on a background modeling configuration without writing code
Multiterminal adaptation Supports PC/ mobile access and content management
feature-rich Support text, rich text, images, files and other types of visual editing, and support content association
Access control The access control system is based on two roles: administrator and operator
External system integration Supports Webhook interface, which can be used to notify external system after operation modification, such as automatically constructing static website and sending notification
Data source compatibility Supports the management of cloud development data of applets/Web/mobile terminals, supports the management of existing data sets, and can also create new content and data sets in the BACKGROUND of CMS
The deployment of simple One-click deployment and upgrade on the extended management interface of the Cloud Development Console

When is CMS appropriate?

1. It is suitable for businesses that need to add an operation management background for small program applications

Small applications have partial operations post editing and publishing, operations management, material management, and other data requirements, use the CMS after extension, don’t have to manually modify the db data online, also need not put into human resources development and management of the background, you can use anytime and anywhere their deployment under the environment of CMS content management system to manage, It also supports the identification and permissions of administrators and operators.

2. Suitable for rapid development of content-oriented website applications, small program applications and other scenarios

CMS content management system can also help developers to improve the efficiency of developing website applications, small program applications, save a part of the back-end development work. For example, after installing the CMS extension, the content and data management and production problems can be solved, and the front-end application framework can read DB data for rendering directly. For example, based on CMS can quickly develop blog, enterprise official website and other small programs/website applications, and finally quietly reveal that the cloud development official website (Cloudbase.net/) is based on CMS extension + Next. Js + cloud development static hosting construction and deployment.

How do I install and use a CMS?

Step 1: Switch to pay-as-you-go

Because CMS extensions need static web hosting resources, they can only be deployed in a pay-as-you-go environment. Therefore, the charging mode must be switched to pay-as-you-go.

1. Developer of wechat applets
  • Login wechat developer tool – Cloud Development Console

  • Click “Pay by volume” in “Cloud Development Console” – “Settings” – “Environment Settings” – “Payment Method”.

Note: it is necessary to ensure that there is a recharge amount in the Tencent cloud account

2. Tencent Cloud developer
  • Log in to Tencent Cloud Development console

  • Click “Switch to pay by volume” in “Cloud Development CloudBase Console” – “Environment” – “Resource Purchase” – “Billing Mode”.

Step 2: Install the extension on Tencent Cloud console

  • To log in to Tencent Cloud console, developers need to use wechat public account to log in
  • Install CMS Content Management System extensions in the “Cloud Development CloudBase Console” – “Extension Capabilities” – “Extension Management”
  • During the installation, you need to authorize resources and configure extensions, for example, the account and password of the administrator and operator. You also need to provide a customized login key. You can click the icon next to the customized login key to learn how to fill in the customized login key.

Step 3: Use CMS content management system

After completing the installation of CMS content management system, then access the management page of the extension, you can view the usage guide in the [Extension Operation Mode] Tab, according to the document to complete the use of CMS, the following simple introduction to get started, more details can refer to the operation mode.

Accessing the CMS System

The CMS extension has been deployed in static web hosting in the current environment. The access path is “default domain name of static hosting + deployment path set by installation”.

The access address format is as follows:

Cloud development static hosting the default domain name/deployment path, such as https://xxxx.tcloudbaseapp.com/tcb-cms/

To login

When you open the CMS system, you will be prompted to log in. You will log in using the administrator account and password set when you install the extension

Content modeling

Once you’ve logged in, you first need to model your content, for example if you want to generate an administrative interface for your blog application (applets/websites).

Assuming that there is already a database collection called Articles that manages articles, we can create a new “Articles” content in the CMS administration background (if the specified collection name does not exist when the content is created, the CMS extension will automatically create a new collection) to create a content management interface of the “Articles” type.

Assume the structure of the database collection articles is as follows:

The field name type describe
_id ID Article unique ID
name String The article title
cover String The cover image of cloudID, where the files stored for cloud development are stored
content String Article content, in Markdown format
author ID The author’s user ID
createTime DateTime Creation time
updateTime DateTime Update time
tag String[] Tags, for example["serverless","cms"]
category String[] Classification, for example[" front-end "," development "]

When we click “New” in “Content Settings” to create the “article” type, we can configure the field type and field restrictions according to the above collection data. For example, the cover image can be directly selected as the “Picture” field type, and the article content can be directly selected as the “Markdown” type. In this way, in the generated management interface, you can directly upload pictures and write articles through the editor. When saving in the database set, it will still be saved as the type supported by the database, pictures will be stored as CloudID, content will be stored as strings, etc.

After creating and saving, the operation interface of “article” will be refreshed automatically

Manage content

Next, we can perform operations management content operations. We can log in as the operator and operate on the newly created “article”. We can create a new article.

When the article is published successfully, you can see it in the article list

Working with content Data

The content managed by CMS can still be accessed through the SDK of cloud development (it should be noted that the security rules of the database should be set correctly during the front-end access, for example, it should be set to be readable by all users and writable by the creator only).

For example, in the above example, we need to fetch the latest 10 articles from CloudBase in the cloud function. We can use the following code to fetch the data:

db.collection("articles")
  .where({ tag: "CloudBase" })
  .orderBy("createTime"."desc")
  .limit(10)
  .get();
Copy the code

The content data can be used in various scenarios, such as building applications and websites in applets/Web. The specific practice of CMS + application development can be followed in our later practical tutorials.

Later, cloud development CMS content management system will support secondary development, users can freely customize their own management background. Cloud development will always adhere to provide one-stop cloud services for developers!

Finally, xiaobian presents “5 minutes to deploy the cloud development CMS system” tutorial to help you quickly get on the bus!

Video link:

V.qq.com/x/page/f096…

Document link :(CMS content management system link)

Cloud.tencent.com/document/pr…

Public account: Tencent Yunyun Development

Tencent Cloud development: Cloudbase.net

The development of cloud console: console.cloud.tencent.com/tcb?from=12…

Win more wonderful scan QR code to learn more