According to the keyword to related articles, the user experience and SEO are both very good. The only bad thing is that the generation of static data will be much slower. First of all, we need to meet two requirements: 1. call a specified topic. 2. the called article must contain the specified keyword. related documentation call {dede: likearttitlelen '24' row '10'} liatitle "[
According to the keyword to related articles, the user experience and SEO are both very good, the only bad thing is that the static generation will be much slower.
First, it is clear that two requirements must be met:
1. to call a specified column
2. the called article should contain the specified keyword
Call related documents
{Dede: likeart titlelen = '24' row = '10 ′}
[Field: title/]
{/Dede: likeart}
Note: This is the official dede call template, but the call basis is unclear so far!
Specified topic call
{Dede: arclist typeid = 'topid' row = '10' titlelen = '20 '}
[Field: textlink/]
{/Dede: arclist}
The following figure shows what I want to achieve:
Topic (ID = 4) related news(The keyword must call a keyword or title).
{Dede: arclist typeid = '4' row = '10' titlelen = '20' keyword = ''}
[Field: textlink/]
{/Dede: arclist}
Code 1
Effect 1:
Code 2:
Effect 2:
Here, if you only use a single keyword, you can. The key below is to call my keywords: that is, keyword = '{dede: fieldname = 'keyword'/}' or I call the title
Keyword = '{dede: field name = 'title '/}'
However, this is rarely used because it is a template call. No one wants to call the same keyword in all articles!
Recommended methods for bloggers:
Bytes --------------------------------------------------------------------------------------
On the document template page
{Dede: field name = 'keyword' function = 'showkeywordarc (, "@ me ")'/}
It indicates that the related articles in all columns (related to the keyword of the current article) are used. The title length is up to 32, and a maximum of 10 articles are displayed. thumbnails are not displayed.
Or
{Dede: field name = 'keyword' function = 'showkeywordarc (, "")'/}
You can find an article with the title "" or "".
For example, this section:
Related articles
{Dede: likeart titlelen = '24' row = '10 ′}
[Field: textlink/] <>
{/Dede: likeart}
Change:
Related articles
{Dede: field name = 'keyword' function = 'showkeywordarc (, "@ me ")'/}
According to the keyword to related articles, the user experience and SEO are both very good.
The only bad thing is that static generation is much slower.
Bytes --------------------------------------------------------------------------------------------------
Appendix 1: How does keyword in arclist call the keywords of the current document (dedecms Zhimeng Technical Forum)
Appendix 2: {dede: arclist}. call any fields of the document or software.
3. dedecms implementation {dede: arclist keyword = '[field: title /]'}
[Arclist flag] This tag is one of the most common DedeCms tags, also known as the free list tag, among them, hotart, coolart, likeart, artlist, imglist, imginfolist, specart, and autolist are all alias tags extended by the different attributes defined by this tag.
Function description:Obtains the list of specified documents.
Applicability:Cover template, list template, document template
Basic syntax:
{Dede: arclist typeid = ''row ='' col = ''titlelen ='' infolen =''
Imgwidth = ''imgheight = ''listtype = '''orderby = ''keyword = ''}
Underlying template (InnerText)
{/Dede: arclist}
Attribute description:
[1]
Typeid= ''Indicates the column ID, which is not required in the list template and archive template. it is allowed in the cover template.", "represents multiple columns separately;
[2]
Row= ''Indicates the total number of returned documents;
[3]
Col= ''Indicates how many columns are displayed (single column by default );
[4]
Titlelen= ''Indicates the title length;
[5]
Infolen= ''Indicates the content description length;
[6]
Imgwidth= ''Indicates the width of the thumbnail;
[7]
Imgheight= ''Indicates the height of the thumbnail;
[8]
Type= ''Indicates the file type. if this attribute is null or type = 'all' is not used
§ Type = 'commend' indicates the recommendation document, equivalent to {dede: coolart} {/dede: coolart}
§ Type = 'image' indicates a document that must contain a thumbnail, equivalent to {dede: imglist} {/dede: imglist}, {dede: imginfolist} {/dede: imginfolist}
§ Type = 'Spec 'indicates the topic, equivalent to marking {dede: specart} {/dede: specart}
The preceding attribute values can be used together. for example, type = 'commend image' indicates the recommended image document.
[9]
Orderby= ''Indicates the sorting method. the default value is senddate, which is sorted by release time.
§ Orderby = 'Hot 'or orderby = 'click' indicates the number of clicks
§ Orderby = 'pubdate' is arranged by publishing time (that is, the time value that can be changed at the front end)
§ Orderby = 'sortrank' sort by the new sorting level of the article (use this attribute if you want to use the top article)
§ Orderby = 'id' sort by Article id
§ Orderby = 'postnum' sort by number of comments
§ Orderby = 'Rand' randomly obtain the list of documents with specified conditions
[10]
Orderway= '': The value is desc or asc. it specifies whether the sorting method is descending or backward. the default value is descending.
[11]
Keyword= ''Indicates the list of documents containing the specified keywords. Separate multiple keywords ","
[12]
Channelid =''Indicates the ID of a specific channel model. the built-in channels include topic (-1), article (1), Gallery (2), Flash (4), and software (3)
[13]
Limit= 'Start, terminate' indicates a limited record range. the row attribute must be equal to "end-start ",
MysqlThe limit statement starts from 0. for example, "limit" indicates that the first five records are obtained. "limit5, 5" indicates that the fifth record starts and five records are removed, if this attribute is used, the row attribute is invalid.
[14]
Att= 'Number' indicates the custom property value
[15]
Subday= 'Days' indicates the number of days of a document. it is usually used to obtain popular documents, recommendation documents, and popular comment documents of a specified number of days.
[16]
Partsort= 'Number of columns' indicates the ID of the column in which all the child numbers of the Parent column are automatically obtained. when it is marked as {dede: autolist} {/dede: autolist, this attribute is valid.
Underlying template field:
ID (same id), title, iscommend, color, typeid, ismake, description (same as info), writer, author title, memberid
Pubdate, senddate, arcrank, click, litpic (same as picname), typedir, typename,
Arcurl (same as filename), typeurl, stime (pubdate in the "0000-00-00" format ),
Textlink, typelink, imglink, image
Where:
Textlink = title
Typelink = typename
Imglink =
Image =
Field call method: [field: varname/]
For example:
{Dede: arclist infolen = '000000 '}
[Field: textlink/]
[Field: info/]
{/Dede: arclist}
Note: The Field implementation in the underlying template is also a form of woven dream mark. Therefore, PHP syntax, Function extension, and other functions are supported.
For example, add the (new) mark to the content published on the current day.
[Field: senddate runphp = 'yes']
$ Ntime = time ();
$ Oneday = 24X3600;
If ($ ntime-@ me) <$ oneday) @ me = "(new )";
Else @ me = "";
[/Field: senddate]