First of all, we often use in the field of user-defined data models:
The created link menu item will be applied to the background content (article) adding interface. In "Background-Content-Data Model-Field Management-Add Field", set the field type to "Linked Menu", and then select the menu you want to use through the linked menu list in the "Menu id" option, such as the regional linked menu, and set the return value method of the linked menu. Then this linked menu item can appear in the content addition editing interface.
The main setting colors are as follows:
The editing interface displays the following effects:
Of course, the menu display style (drop-down, pop-up) can be configured in "Background-Extension-Linkage Menu-Modify".
Second, directly call the linkage menu in the phpcms template:
This method is not commonly used. The specific method is to enter the "background-extension-linkage menu list", and you will see that each linkage menu has a calling code. Just copy and paste this code into the template location where you want to place it.
But according to experience, this is not enough, because although the linkage menu is removed through this code, css and js files are missing when displaying this menu, resulting in the lack of style and effect, so you need to ensure that several files are introduced into your template at the same time:
statics/js/dialog.js
statics/js/linkage/js/pop.js
statics/css/dialog.css
Third, use common tags in php files or templates to directly read the data in the linked menu data table:
This method is often used in our secondary development. The data of linkage menu is stored in the data table of v9_linkage, and different levels of data can be obtained according to the field designation such as parentid.
Because the development-related methods or functions related to phpcms are complicated, I won't explain them in detail here. For details, please refer to the official development manual and video tutorial of iphpcms, and the demo code given here is easy to understand:
Demonstration of calling code in php program;
$linkage_db? =? PC _ base::load _ model(" linkage _ model "); ? //Introduce the model
$data? =? $ linkage _ d B- & gt; select(array(' parentid ' = & gt; 0)); ? //Demonstrate general label writing in data template for reading specified conditions:
{pc:get? sql="select? *? From where? phpcms_linkage? Where is it? parentid=0? And then what? keyid= 1 "? num="99"}
{Cycle? $data? $v}
& lt Li> province: {$ v[name]}