Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of adding automatic numbering to atlas pictures by DEDECMS

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you the method of adding automatic numbering to the atlas by DEDECMS. I hope you will gain a lot after reading this article. Let's discuss it together.

How does DEDECMS automatically number an atlas picture?

In the atlas content page when calling the atlas will inevitably use the ID number and so on, this tutorial will teach you how to automatically number the atlas pictures, the code is very simple, interested friends can understand ha, hope to help you

It will teach you how to automatically number an atlas, that is, it is very simple to let the {dede:productimagelist} tag support automatic numbering.

Open the include/taglib/productimagelist.lib.php file and find:

$ctp- > LoadSource ($innerText)

After it, start another line to join

$GLOBALS ['autoindex'] = 0

Find:

$revalue. = $ctp- > GetResult ()

After it, start another line to join

$GLOBALS ['autoindex'] + +

Even if the changes here are over, the following is called in the content page:

[field:global name=autoindex/]

Example:

The code is as follows:

{dede:productimagelist}

{/ dede:productimagelist}

If there are three pictures, the result is:

The code is as follows:

After reading this article, I believe you have a certain understanding of DEDECMS's method of automatically numbering atlas pictures. If you want to know more about it, you are welcome to follow the industry information channel. Thank you for your reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report