Home  >  Article  >  CMS Tutorial  >  How to display the column name in the Dream Weaver cms album

How to display the column name in the Dream Weaver cms album

藏色散人
藏色散人Original
2019-12-19 09:15:082476browse

How to display the column name in the Dream Weaver cms album

Dreamweaver cms album {dede:field name='imgurls'How to display the column name?

Today I received another paid service from Dreamweaver CMS. The client’s website is Dreamweaver Picture Station, so the content page uses an atlas.

Recommended study: 梦Weavingcms

He wants to display the column name on the alt of the picture. The default is that there is no such label.

Weaving The default label of Dream Atlas is mainly a [field:alttext /] and a [field:imgsrc/].

The album label uses this {dede:field name='imgurls', so what about the alt of the picture? How about adding the column name?

Open the /include/taglib/channel/img.lib.php file and find about 79 lines

How to display the column name in the Dream Weaver cms album

These 3 places It has been modified. I put the three pieces of code below respectively

$row = $refObj->dsql->GetOne("SELECT t2.title as title,(select t1.typename from dede_arctype as t1 where t1.id=t2.typeid) as typename FROM dede_archives as t2 WHERE t2.id = '$aid';");
 
$typename = $row['typename'];
 
$fields['typename']=$typename;

Then it perfectly solves the problem of wanting to display the column name in the Dreamweaver Atlas. Just add [field:typename/] to the alt.

The above is the detailed content of How to display the column name in the Dream Weaver cms album. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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