Compared with DIY, the DiscuzX series internal and external calls can reduce unnecessary code and redundant DIY layers to make the website faster and stronger. In addition, DIY cannot be used in some places, for example, the header cannot be DIY, but can be implemented by using internal or external calls. Today, we will use an internal call in the header to illustrate how the DiscuzX series,
Compared with DIY, the DiscuzX series internal and external calls can reduce unnecessary code and redundant DIY layers to make the website faster and stronger. In addition, DIY cannot be used in some places, for example, the header cannot be DIY, but can be implemented by using internal or external calls. Today, we will use an internal call in the header to illustrate the use of internal and external calls in the DiscuzX series.
Like DIY, the home page creates a module template to display the style when calling the template.
Written static
Src = "http://www.moke8.com/?_g='style'{}'styleimgdir'#/ad/555.jpg"
/> Href = "http://www.moke8.com/#"> Welcome to archy blog
Src = "http://www.moke8.com/?_g='style'{}'styleimgdir'#/ad/666.jpg"
/> Href = "http://www.moke8.com/#"> www.h517.com blog
Src = "http://www.moke8.com/?_g='style'{}'styleimgdir'#/ad/555.jpg"
/> Href = "http://www.moke8.com/#"> Welcome to archy blog
Src = "http://www.moke8.com/?_g='style'{}'styleimgdir'#/ad/666.jpg"
/> Href = "http://www.moke8.com/#"> www.h517.com blog
In the background, choose Portal> module Template> Add> select module category> submit, for example:
After submission, go to the interface as shown in Figure. Template name: for example, ARCHY external call. copy the static code above to the framework below, add loops, modify corresponding variables, and submit the template, the module template is complete.
The code for converting to a template is as follows:
[Loop]
Width = "{picwidth}" height = "{picheight}"/> title = "{title}" href = "http://www.moke8.com/#url }"
Target = ""> {title}
[/Loop]
After the template is ready, our work is completed in half. we will add data calls below.
Backend -- Portal -- Module Management -- data call -- Module category -- select module category -- add call
Enter the Module ID, Forum, topic filtering, topic sorting method, number of display items, and data cache update,
Select the module template we made before the display style: ARCHY external call.
This is basically the same as that of common DIY. after setting it, make sure that you can see your generated call in the module list. clicking the internal call will bring up a similar
Code, and then
Copy to your template to replace the corresponding static code. External calls are similar to internal calls. if you select external calls instead of the corresponding static code, the usage of internal and external calls in the DiscuzX series will be shared.