In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you to achieve dede call the relevant articles under the specified column of the method, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!
How to implement the relevant articles under the specified column by calling dede?
First of all, it is clear that two requirements must be met:
Recommended study: dream weaving cms
1. To call the specified column
2. The invoked article should contain the specified keyword
Related document call
{dede:likeart titlelen='24' row='10'} [field:title /] {/ dede:likeart}
Note: this is the official dede call template, but so far it is not clear on which to call!
The specified column calls the
{dede:arclist typeid=' column ID' row='10' titlelen='20'} [field:textlink/] {/ dede:arclist}
Here is what I want to achieve by myself:
Specify the call to the news related to the column (ID=4) (keyword to be called by keyword or title)
{dede:arclist typeid='4' row='10' titlelen='20' keyword=''} [field:textlink/] {/ dede:arclist}
Code 1
Effect 1:
Code 2:
Effect 2:
If you are only a single keyword here, then it will be fine. The following key is my keyword to call: that is, keyword=' {dede:field name='keywords'/}'or I call the title
Keyword=' {dede:field name='title'/}'
However, this is rarely used because it is a call template. No one wants all articles to use the same keyword!
Bloggers recommend methods:
-
Put it in the article template page
{dede:field name='keywords' function='ShowKeyWordArc (0pr 32je 10je 0, "@ me")'/}
It means to take the relevant articles in all columns (related to the keywords of the current article). The maximum length of the title is 32, with a maximum of 10 items displayed, and no thumbnails are displayed.
Or
{dede:field name='keywords' function='ShowKeyWordArc (0Jing 32 Jing 10 Jing 0, Senior three Chinese)'/}
You can find articles in the title that contain "Senior three Chinese" or "Senior three" or "Chinese".
For example, this paragraph:
Related articles {dede:likeart titlelen='24' row='10'} [field:textlink/]
< >{/ dede:likeart}
Change it to:
Related articles {dede:field name='keywords' function='ShowKeyWordArc (0pc32, 10jin0, "@ me")'/}
According to the keywords, the articles are very good in terms of user experience and SEO.
The only downside is that static generation is much slower.
-
Attach how keyword calls the keywords of the current document in 1:arclist (dedecms Dream Weaving Technology Forum)
Attachment 2: {dede:arclist} learning experience, call any field of the article or software
Attachment 3. Dedecms to achieve {dede:arclist keyword=' [field:title/]'} effect
[Arclist tag] this tag is one of the most commonly used tags in DedeCms, also known as free list tags, where hotart, coolart, likeart, artlist, imglist, imginfolist, specart, and autolist are alias tags that extend from the different attributes defined by this tag. Function description: get the specified document list applicable scope: 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='' represents column ID, which generally does not need to be specified in list template and file template. "," is allowed to represent multiple columns separately in cover template.
[2] row='' indicates the total number of documents returned
[3] col='' indicates how many columns are displayed (default is single column)
[4] titlelen='' indicates title length
[5] infolen='' indicates the length of the content introduction
[6] imgwidth='' represents thumbnail width
[7] imgheight='' represents the height of the thumbnail
[8] type='' represents the file type, where a null value, if this attribute is not used, or type='all' is a normal document
When §type='commend', it represents the recommended document, which is equivalent to {dede:coolart} {/ dede:coolart}
In §type='image', a document that must contain thumbnails is equivalent to {dede:imglist} {/ dede:imglist}, {dede:imginfolist} {/ dede:imginfolist}
When §type='spec', it represents a topic, which is equivalent to the tag {dede:specart} {/ dede:specart}
The above attribute values can be used together, for example, type='commend image' represents the recommended picture document.
[9] orderby='' indicates sorting mode, and the default value is senddate sorted by release time.
§orderby='hot' or orderby='click' means to arrange by number of clicks
§orderby='pubdate' is arranged by publication time (that is, the time value allowed to be changed by the front desk)
§orderby='sortrank' sorts by the new sort level of the article (use this attribute if you want to use the top article)
§orderby='id' is sorted by article ID
§orderby='postnum' sorts by the number of comments on the article
§orderby='rand' randomly gets a list of documents for specified conditions
[10] the orderway='' value is desc or asc, and specifies whether the sorting method is descending or forward. The default is descending.
[11] keyword='' represents a list of documents with specified keywords, with multiple keywords separated by ","
[12] channelid='' represents a specific channel model ID, with built-in channels: project (- 1), article (1), atlas (2), Flash (4), software (3)
[13] limit=' start, end 'means a limited range of records. The row attribute must be equal to "end-start". The limit statement of mysql starts with 0, such as "limit 0Mague 5" means to take the first five records, "limit 5Power5" means to take down five records from the fifth record, after using this attribute, the row attribute will be invalid.
[14] att=' value 'indicates a custom attribute value
[15] subday=' days' indicates the number of days within a document, and is usually used to get hot documents, recommended documents, popular comment documents, etc., with a specified number of days.
[16] the number of digits in the partsort=' arrangement 'means to automatically get the column ID of all the children of the parent column, which is marked as {dede:autolist} {/ dede:autolist}. The use of this attribute is valid.
Underlying template field:
ID (same as id), title,iscommend,color,typeid,ismake,description (same as info), writer,shorttitle,memberidpubdate,senddate,arcrank,click,litpic (same as picname), typedir,typename,arcurl (same as filename), typeurl,stime ("0000-00-00" format of pubdate), textlink,typelink,imglink,image
Where:
Textlink = titletypelink = typenameimglink =
Image =
Field call method: [field:varname/]
Such as:
{dede:arclist infolen='100'} [field:textlink/]
[field:info/]
{/ dede:arclist}
Note: the Field implementation in the underlying template is also a form of dream tagging, so it supports the use of PHP syntax, Function extensions and other functions.
For example, add (new) logo to the content posted on the same day.
[field:senddate runphp='yes'] $ntime = time (); $oneday = 3600 * 24 if (($ntime-@ me))
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.