Home > CMS Tutorial > PHPCMS > body text

How to retrieve column pictures in phpcms

王林
Release: 2020-02-06 17:53:38
Original
2625 people have browsed it

How to retrieve column pictures in phpcms

1. The best solution for calling the column image on the phpcms column page:

phpcms calls the highest parent column image:

{$CATEGORYS[$top_parentid][image]}
Copy after login

phpcms calls directly Parent column picture:

{$CATEGORYS[$parentid][image]}
Copy after login

phpcms calls the current column picture:

{$CATEGORYS[$catid][image]}
Copy after login

phpcms calls the column picture with the specified id:

{$CATEGORYS[78][image]}
Copy after login

If the secondary column does not set a picture, then the default Call the picture of the parent column

{if $image}{else}{/if}
Copy after login

2. As follows:

 
{pc:content action="category" catid="$top_parentid" num="20" siteid="$siteid" order="listorder ASC"} {loop $data $r}
{pc:content action="position" catid="$r[catid]" num="1" order="id DESC" posid="32"} {loop $data $r}

{str_cut($r[title],36,'..')}

{str_cut($r[description],116,'..')}[详情]

{/loop} {/pc} {pc:content action="lists" catid="$r[catid]" num="5" siteid="$siteid" order="id desc" }
    {loop $data $val}
  • [{date('m-d',$val[inputtime])}]

    {$val['title']}

  • {/loop} {/pc}
{/loop} {/pc}
Copy after login

Recommended related tutorials: phpcms tutorial

The above is the detailed content of How to retrieve column pictures in phpcms. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!