Here's how to call the various column names:
1, {Dede:field name= "typename"} This is the name of the call current column
2. {dede:channel type= ' son ' row= ' 5 '} <a href= ' [field:typeurl/] ' >[field:typename/]</a> {/dede:channel} This is the call to the top channel all Word columns, row representative call 5
3. {dede:type typeid= ' column ID '} <a href= ' [field:typeurl/] ' >[field:typename/]</a> {/dede:type} ' indicates the column that invokes the specified ID. However, only one can be invoked, and multiple calls can only be repeated multiple times to call the label
4, {dede:channel type= ' top '}<a>[field:typename/]</a> {/dede:channel} call the current top-level column name of the child column
Here's how to invoke top-level column names:
Method One:
{Dede:field.typeid runphp= ' yes '} $ID = @me; $sql = "SELECT * from ' dede_arctype ' WHERE id= $ID"; $query = mysql_query ($sql); $row =mysql_fetch_array ($query); $relID = "$row [Reid]"; if ($relID = = 0) {@me = $row [TypeName];} else{$sql = "Select ' TypeName ' from ' Dede_arctype ' WHERE id= $relID"; $query = mysql_query ($sql); $row =mysql_fetch_array ($ query); @me = $row [TypeName];} {/dede:field.typeid}
This method statement is somewhat long.
The key recommendation method of dream-weaving two
Method Two:
{dede:field.title runphp= ' yes '}list ($toptype, $sontype) =split ('/', @me); @me = $toptype; {/dede:field.title}
Method Three:
{Dede:field.typeid runphp= ' yes '} $ID = @me; $sql = "SELECT * from ' dede_arctype ' WHERE id= $ID"; $query = mysql_query ($sql); $row =mysql_fetch_array ($query); $relID = "$row [Reid]"; $topID = "$row [Topid]"; if ($relID = = 0) {@me = $row [TypeName];} else{$sql = "Select ' TypeName ' from ' Dede_arctype ' WHERE id= $topID"; $query = mysql_query ($sql); $row =mysql_fetch_array ($ query); @me = $row [TypeName];} {/dede:field.typeid}
This method is improved, can be for the unlimited sub-column access to top-level columns, method one or two are targeted at level two column.
Call a sub column under the specified top-level column
<!--engineering construction-->
{dede:channelartlist typeid= ' 9,9 '}
<li><a href= "{dede:field name= ' typeurl '/}" class= "Nav1" >{dede : Field Name= ' TypeName '/}</a>
<div class= ' nav_2 '
{dede:channel ' type= ' son ' yes '}
noself= Href= "[field:typelink/]" >[FIELD:TYPENAME/]</A>
{/dede:channel}
<div class= "nav_2f" ></ Div>
</div>
</li>
{/dede:channelartlist}