Home > Common Problem > How does empire cms make the article call display two columns?

How does empire cms make the article call display two columns?

WBOY
Release: 2023-04-04 16:00:02
forward
1219 people have browsed it

We want to call the article list to display two or more columns to achieve the effect as shown below. What should we do?

How does empire cms make the article call display two columns?

At this time, we need to use the ecmsinfo tag of the empire. The ecmsinfo tag is also called a universal tag, which can realize various content display styles. The method steps are as follows:

ecmsinfo tag syntax introduction

Tag name: Information call tag with template [universal tag]

[ecmsinfo]Column ID/topic ID, number of displayed items, number of title interceptions, whether to display the column name, operation type, label template ID, only display pictures with titles[/ecmsinfo]

Note: The only difference between the ecmsinfo tag and other information calling tags is that the display style is determined by the tag template, and the red parameter specifies the tag template used.

Label template production format

List head!--empirenews.listtemp--]List content!--empirenews.listtemp--]List tail

Description: The first !--empirenews.listtemp--] indicates the beginning of the cycle, and the second !--empirenews.listtemp--] indicates the end of the cycle.

Add label template

1. Log in to the backend - click on the large menu template management to manage label templates and enter the following interface:

Figure 1: Menu Navigation

How does empire cms make the article call display two columns?

Figure 2: Management label template interface

How does empire cms make the article call display two columns?

2. After clicking the Add Label Template button, you will enter the Add Label Template page, as shown in the figure:

How does empire cms make the article call display two columns?

ecmsinfo tag usage examples: 1. Example 1, to achieve the following effect: (one row, one column)

How does empire cms make the article call display two columns?

1. Make label template

Figure 1: Use Dreamweaver to create a good interface:

How does empire cms make the article call display two columns?

Figure 2: Insert the list.var tag at the corresponding position. After inserting the tag, the Dreamweaver code display effect of the page template content

How does empire cms make the article call display two columns?

Design View

How does empire cms make the article call display two columns?

2. Copy the prepared label template code to the system background to add a label template:

Log in to the backend - click on the large menu Template Management to manage label templates: then click the Add Label Template button to enter the Add Label Template page, as shown in Figure

How does empire cms make the article call display two columns?

3. After clicking submit, we return to the management label template and see the label template we just added, as shown in the figure:

How does empire cms make the article call display two columns?

4. After the label template is completed, we can use the ecmsinfo label to call information, such as:

[ecmsinfo]2,8,38,0,0,9,0[/ecmsinfo]

Description: The above label is to call the column information with column ID=2; the display number is 8; the title intercepts 38 characters; the operation type is to call the latest column (0); use the label template with template ID=9.

5. Now we modify the home page template and check the display effect:

Log in to the backend-Template Management-Public Template-Modify the homepage template and add the call tag to the template, as shown in the figure:

How does empire cms make the article call display two columns?

After modifying the home page template, we click Preview to view the modified home page effect, as shown below:

How does empire cms make the article call display two columns?

5. Attached is the above example template code:

Code 1: Label template-page template content code

!--the.classname--]

More

!--empirenews.listtemp--] !--empirenews.listtemp--]

Code 2: Label template-list content template (list.var) code:

!--title--] [!--newstime--]]

2. Example 2, achieve the following effect: (one row and multiple columns)

How does empire cms make the article call display two columns?

1. Make label template

Figure 1: Use Dreamweaver to create a good interface:

How does empire cms make the article call display two columns?

Figure 2: Insert the list.var tag at the corresponding position. After inserting the tag, the Dreamweaver code display effect of the page template content

How does empire cms make the article call display two columns?

Design View

How does empire cms make the article call display two columns?

Figure 3: List content template: that is, content variables and displayed content. Represents the display style of each piece of information.

How does empire cms make the article call display two columns?

Code:

How does empire cms make the article call display two columns?

2. Copy the prepared label template code to the system background to add a label template:

Log in to the backend - click on the large menu Template Management to manage label templates: then click the Add Label Template button to enter the Add Label Template page, as shown in the figure:

How does empire cms make the article call display two columns?

3. After clicking submit, we return to the management label template and see the label template we just added, as shown in the figure:

How does empire cms make the article call display two columns?

4. After the label template is completed, we can use the ecmsinfo label to call information, such as:

[ecmsinfo]0,4,38,0,3,10,1[/ecmsinfo]

Description: The above label shows that the number of records is 4; the title intercepts 38 characters; the operation type is to call all news latest (3); use the label template with template ID=10; only display information with title pictures.

5. Now we modify the home page template and check the display effect:

Log in to the backend-Template Management-Public Template-Modify the homepage template and add the call tag to the template, as shown in the figure:

How does empire cms make the article call display two columns?

After modifying the home page template, we click Preview to view the modified home page effect, as shown below:

How does empire cms make the article call display two columns?

5. Attached is the above example template code:

Code 1: Label template-page template content code

!--empirenews.listtemp--] !--empirenews.listtemp--]

Code 2: Label template-list content template (list.var) code

!--title--]

The above is the detailed content of How does empire cms make the article call display two columns?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template