program development

Dede website construction practical chapter

I recently made a small order and learned some knowledge from it and share it with you.<div id="navMenu& […]

article directories

I recently made a small order and learned some knowledge from it and share it with you here

<div id=”navMenu”>
<ul>
<li>&lt;a href='{dede:global.cfg_cmsurl/}/'&gt;<span>Home</span></a></li>
{dede:channelartlist typeid=’top’ row=’10’}
<li> {dede:type typeid=’top’} <a href=”[field:typelink/]”>[field:typename/]</a> {/dede:type}
<ul>
{dede:channel type=’son’ noself=’yes’}
<li> <a href=”[field:typelink/]”>[field:typename/]</a> </li>
{/dede:channel}
</ul>
</li>
{/dede:channelartlist}
</ul>
</div>
Call both the primary directory and the secondary directory. Because sometimes some catalogs in this category have secondary catalogs.
Article list page, with one line for each article.

dede:list pagesize=’25’}
[field:global runphp=’yes’ name=autoindex]
$a=”<li class=’line’>”;
$b=”<li>”;
if ((@me%5)==0 && @me!= 30) @me=$a;
else @me=$b;
[/field:global]
<a href=”[field:arcurl/]” target=”_blank”>[field:title/]</a><span class=”rt”>[field:pubdate function=”MyDate(‘Y-m-d’,@me)”/]</span>
</li>
{/dede:list}

 

Dream Weaving Level 2 column, solve the highlighted problems in the current column

Without saying a word, add the code.

First, modify includetaglibchannelartlist.lib.php

Find $pv-&gt;Fields['typeurl']= GetOneTypeUrlA($typeids[$i]);

Add the following code below:

 

  1. //The current column is highlighted
  2. if($typeids[$i][‘id’]?==?$ refObj->TypeLink->TypeInfos[‘id’]){
  3. $pv->Fields[‘currentstyle’]?=?’? class=”m_hover”‘;
  4. }
  5. else{
  6. $pv->Fields[‘currentstyle’]?=?”;
  7. }

Save.

 

When using, use it like this

 

  1. <ul? class=”ky7″>
  2. {dede:channelartlist? type=’son’? noself=’yes’? typeid=’2′}
  3. <li><a? href=”{dede:field? name=’typeurl’/}”? {dede:field? name=’currentstyle’/}>{dede:field? name=’typename’/}</a></li>
  4. {/dede:channelartlist}
  5. </ul>

In this way, the a-tag of the current column will have one more.m_hover class

Just define different styles in css.