DedeCms When publishing the content of DedeCMS articles, you can select document attributes such as "headline", "recommendation" and "special recommendation". We can use these conditions to add a judgment tag, and then add a recommendation stamp to the article list Icon , which greatly improves the friendliness of the page.

Text recommendation method:

[field: flag runphp='yes'] if (stristr (@ me, "c")) @ me="[Recommended]"; else @me = ''; [/field:flag]
[field: flag runphp='yes'] if (stristr (@ me, "a")) @ me="[Recommended]"; else @me = ''; [/field:flag]

Note: The above code will display "[Recommended]" if the article contains a recommendation attribute.

Recommended methods for icons:

[field: flag runphp='yes'] if (stristr (@ me, "a")) @ me="<img src='Image Address'>"; else @me = ''; [/field:flag]
[field: flag runphp='yes'] if (stristr (@ me, "c")) @ me="<img src='image address'>"; else @me = ''; [/field:flag]

Note: Replace the above image path with the logo image path you want to display.

Post reply

Can't comment until