Under normal circumstances, we can only respond to an event by clicking the menu of the Public Account platform, for example, a multi-text event. However, this multi-text event is added in advance and will be replied once upon clicking the menu, each reply message is the same. If you want to change the message, you can only modify multiple texts, which is time-consuming and effort-consuming. When you bind a custom menu to a topic to obtain the latest message, you can only respond to an event by clicking the menu of the public account. Common events include multi-graphic events, however, this multi-text file is added in advance. You can reply once after you click the menu, and the message is the same for each reply. If you want to change it, you can only modify multiple text files, this is time-consuming and laborious.
Custom menu binding topic to get the latest message
Is there a way to update an article in a topic of a website and automatically obtain the latest text message of this topic when you click a menu on the platform? The answer is yes.
Implementation idea: in combination with the phpcms plug-in, bind a topic of the phpcms system column in the custom menu event in the background. After binding, we do not need to add any text or text, you only need to set the number of text records that the menu event replies.
After the configuration is complete, as long as there is an article update in this topic of the website, the user will obtain the latest news of this topic when clicking this menu on the platform. Besides, when you click to view more information, obtain the historical image and text of the menu. :
However, I still have A special idea. Users in different cities or regions can click the same menu on the platform to obtain messages from the corresponding region. For example, user A is A Beijinger, user B is from Shanghai. They click the "latest information" menu on the platform. User A obtains the latest information from Beijing, while user B obtains the latest information from Shanghai. Can this happen? The answer is yes.
Purpose: applicable to any website or public account
The custom menu replies to the latest message in the region according to the region in which the user is located.
This feature is a further application of the previous "custom menu binding topic to obtain the latest message" function, and is more complicated to implement.
Implementation idea: when a user enters the public account platform, the user's latitude and longitude are automatically obtained. The user's province, city, and region are automatically obtained based on the latitude and longitude. When you click the menu, the menu pushes the latest message based on the city or region to which the user belongs.
Purpose: Suitable for public accounts of national or regional information
More functions and demosPhpcms DevelopmentPublic Account