Dream weaving calls the top column and the method of the second column below
The editor would like to share with you the method of weaving dreams to call the top column and the second column below. I believe most people don't know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. let's learn about it!
Dream weaving how to use the top column and the second column below?
Dream weaving calls the top column and the second column below
Recommended study: dream weaving cms
Sometimes you need to call the top-level column and the second-level column below, such as when making a drop-down menu. The easiest way to call the second-level column:
{dede:channelartlist typeid='top'} {dede:field name='typename'/} {dede:channel type='son' noself='yes'} [field:typename/] {/ dede:channel} {/ dede:channelartlist}
Sometimes, when you need to make a style, you need to add a different css to a tag in dede:channelartlist, such as the following example:
{dede:channelartlist typeid='top'} {dede:field name='typename'/} {dede:channel type='son' noself='yes'} [field:typename/] {/ dede:channel} {/ dede:channelartlist}
{dede:global name='itemindex'/} is automatically incremented each time the top-level column is called.
For a more complex way to call a secondary column, use the dede:php tag, as in the following example:
The home page of the website {dede:channelartlist typeid='top'} {dede:php} $thisid = $refObj- > Fields ['id']; $dsql- > SetQuery ("Select * from `dede_ arctype` where reid=". $thisid. "ORDER BY sortrank"); $dsql- > Execute (); $iposit while ($arr = $dsql- > getArray ()) {$I = $I + 1x roomstr = implode (',', $arr); if (! empty ($str) & $iposite1) {echo'
';} echo'. $arr ['typename'].';} if (! empty ($str)) echo''; if (empty ($str)) {echo';} {/ dede:php} {dede:field name='typename'/} {/ dede:channelartlist}
This approach is more complex, but also more flexible.
The above is all the contents of the top column and the second column below. Thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!