First of all, it is clear that two requirements are met:
1. To invoke the specified column
2. Call the article to include the specified keyword
Related Document calls
{dede:likeart titlelen= ' 24′row= ' 10′}
<li><a title= "[Field:title function= ' Htmlspecialchars (@me) '/]" href= "[Field:arcurl/]" >[field:title/] </a></li>
{/dede:likeart}
Note: This is the Dede official call template, but it is not clear to invoke the basis!
Specify the column call
{dede:arclist typeid= ' column id ' row= ' titlelen= ' 20 '}
[field:textlink/]
{/dede:arclist}
Here's what I want to achieve:
Specified column (id=4) related news (keyword to invoke the keyword or title)
{dede:arclist typeid= ' 4 ' row= ' titlelen= ' keyword= '}
[field:textlink/]
{/dede:arclist}
Code 1
Effect 1:
Code Listing 2:
Effect 2:
If you are just a single keyword here, then you can. The key below is my keyword to call: keyword= '{dede:field name= ' keywords '/}' or I call the title
Keyword= '{dede:field name= 'title '/}'
This is rarely used, however, because it is called a template. No one wants all the articles to call the same keyword!
Bo Main Recommendation Method:
--------------------------------------------------------------------------------------
Put in the article template page
{Dede:field name= ' keywords ' function= ' showkeywordarc (0,32,10,0, "@me") '/}
means to take all the relevant articles in the column (related to the keywords in the current article), the title length of 32, up to 10 display, do not display thumbnails
Or
{Dede:field name= ' keywords ' function= ' showkeywordarc (0,32,10,0, "Senior Chinese") '/}
Can be found in the title, contains "senior Chinese", or contains "senior" or "Chinese" article
For example, this paragraph:
Related articles
{dede:likeart titlelen= ' 24′row= ' 10′}
[field:textlink/]< >
{/dede:likeart}
is changed to:
Related articles
{Dede:field name= ' keywords ' function= ' showkeywordarc (0,32,10,0, "@me") '/}
According to the keywords to related articles, on the user experience and SEO is very good
The only downside is that it's a lot slower to generate static.
--------------------------------------------------------------------------------------------------
Attached 1:arclist keyword How to invoke the keyword in the current document (Dedecms Technology Forum)
Attached 2: {dede:arclist} learning experience, call the article or any field of the software
attached 3, dedecms Implementation {dede:arclist keyword= ' [field:title/] '} effect
| "Arclist tag " |
| This tag is the most commonly used mark of Dedecms, also known as a free list tag, where Hotart, Coolart, Likeart, Artlist, Imglist, Imginfolist, Specart, autolist These tokens are the alias tokens that are extended by the different attributes defined by this tag. |
| function Description: Gets the specified list of documents |
| Scope of application: cover page template, list template, document template |
Basic syntax: {dede:arclist typeid= ' row= ' col= ' titlelen= ' infolen= ' Imgwidth= ' imgheight= ' listtype= ' orderby= ' keyword= '} Underlying template (InnerText) {/dede:arclist} |
Property Description: [1]typeID= "" Indicates the column ID, in the list template and the profile template generally do not need to specify, in the cover page template allows "," separate representation of multiple columns; [2]Row= "Indicates the total number of returned document lists; [3]Col= "Indicates how many columns are displayed (the default is a single column); [4]Titlelen= "Indicates the length of the title; [5]Infolen= "Indicates the length of the content introduction; [6]ImgWidth= "indicates the width of the thumbnail image; [7]ImgHeight= "Indicates the height of the thumbnail image; [8]type= ' ' Indicates the file type, where null value, not using this attribute or type= ' all ' is a normal document §type= ' commend ', indicates the recommended document, equivalent to {Dede:coolart}{/dede:coolart} §type= ' Image ' indicates a document that must contain a thumbnail image, equivalent to {dede:imglist}{/dede:imglist}, {dede:imginfolist}{/dede:imginfolist} §type= ' Spec ', indicates the topic, equivalent to tag {Dede:specart}{/dede:specart} The above attribute values can be used in conjunction, such as: type= ' commend image ' to represent the recommended picture document [9] by= ' ' means sort by default, senddate by publish time. §orderby= ' hot ' or orderby= ' click ' means by number of clicks §orderby= ' pubdate ' by publication time (that is, the time value that the foreground allows to change) §orderby= ' Sortrank ' is sorted by the new sort level of the article (use this property if you want to use a pinned article) §orderby= ' id ' sorted by article ID §orderby= ' postnum ' sort by article comment number §orderby= ' Rand ' randomly obtains a list of documents for the specified condition [10]Orderway= ' value is DESC or ASC, specifies whether the sort is descending or a forward sort, and the default is descending. [11]keyword= ' ' Indicates a list of documents with the specified keyword, and multiple keywords are separated by "," [12]channelid="Indicates a specific channel model ID, built-in channel: Special (-1), article (1), Atlas (2), Flash (4), software (3) [13]Limit= ' Start, end ' represents a qualified record range, the row property must be equal to "end-start", MySQL limit statement is starting from 0, such as "limit 0,5" refers to the pre-Wubi record, "limit 5,5" means the fifth record, remove Wubi record, When this property is used, the row property is not valid. [14]att= ' value ' denotes custom attribute value [15]Subday= ' Days ' indicates the number of days in a document, typically used to get popular documents, recommended documents, popular comment documents, etc. for a specified number of days [16]Partsort= ' permutation digits ' means that the column ID that is arranged in the first section of the parent column is automatically obtained, and the use of this property is valid when marked with {dede:autolist}{/dede:autolist}. |
underlying template fields: ID (same ID), title,iscommend,color,typeid,ismake,description (same as info), Writer,shorttitle,memberid Pubdate,senddate,arcrank,click,litpic (with Picname), Typedir,typename, Arcurl (same as filename), Typeurl,stime (pubdate "0000-00-00" format), Textlink,typelink,imglink,image which Textlink = <a href= ' Arcurl ' >title</a> Typelink = <a href= ' Typeurl ' >typename</a> Imglink = <a href= ' arcurl ' ></a> Image = field Call method: [field:varname/] Such as: {dede:arclist infolen= ' 100 '} [field:textlink/] <br> [field:info/] <br> {/dede:arclist} Note: The field implementation in the underlying template is also a form of a dream marker, so it supports the use of PHP syntax, function extensions and other functions such as: Add (new) logo to the content posted on the same day [Field:senddate runphp= ' yes '] $ntime = time (); $oneday = 3600 * 24; if ($ntime-@me) < $oneday) @me = "<font color= ' Red ' > (new) </font>"; else @me = ""; [/field:senddate] |
Dedecms how to invoke the relevant article under the specified column