A method of generating random article list by moving easily siteweaver

Source: Internet
Author: User
Keywords Articles functions tags series products then

Moving Easy ®siteweaver™ Series products are easy to http://www.aliyun.com/zixun/aggregation/6499.html "> Network Technology Co., Ltd. based on ASP language and mssql/access Database development of Open source Web site management system, is a perfect design and applicable to a variety of server environment efficient, new, fast and excellent site solutions, whether in the stability, load capacity, security and other aspects of domestic and foreign similar products at home and abroad leading position.

Siteweaver™ Series products mainly for small and medium-sized site construction and management design and research and development, with its ASP platform simple, easy to use and product itself, ease of use, flexibility and other characteristics, for the rapid construction of small and medium-sized Web site provides the fastest way to get started and best practice.

Siteweaver™ series of products is the predecessor of the company's independent research and development of the powereasy®2006 version of the series of products, with more than 400,000 of the application scale of the Web site, accounting for 1/4 of the total number of domestic sites, won the government, enterprises, research and education and the media and other industries widely praised , stable according to the domestic CMS leader position.

Siteweaver™ Series products include content management system, online store system, industry portal system and so on.

The advantage of adding a random list of articles to a page is to reduce the similarity of the page in the site and avoid the search engine to treat the page as a copy page. My QQ code station, this station is this situation. Then to achieve the function is: output a random list of articles, each time the HTML page generated, the list is not the same, each page list is also different, of course, if not generated static, then each refresh the page, the list will change.

The dynamic Siteweaver itself does not provide the ability to generate a list of random articles, there is no relevant plug-ins, to achieve this function can only use the dynamic custom tags, the following provides two versions, Access version and SQL version of the SQL version of the forum is cited easy to write.

One, easy Siteweaver+sql database implementation of random articles list:

Create a new function tag in the background Custom label management:

Label Name: {$MY _ Random article}-customizable label name

Query statement: Select Top articleid,classid,title,updatetime from Pe_article where Channelid in ({input (0)}) and ClassID in ({ Input (1)}) and DateDiff (Day,updatetime,getdate ()) <7 and Deleted=0 and status=3 order by NEWID ()

Label contents: {loop}{infobegin}{$Field (2,text,22,2,1)}

{Infoend} {/loop}

Call method: In the template appropriate place to add: {$MY _ random article (channel ID, column ID)} Can, channel ID, column ID according to their actual changes.

Description:

1, select Top 10 .... 10 is to query the number of articles, you can change their own, but it is not recommended to change too much.

2, if you do not want to call the column, but call a channel under the article, then you can put Channelid in ({input (0)}) and ClassID in ({input (1)}) modified to: Channelid in ({input (0)}), the corresponding, The call tag is: {$MY _ random article (channel ID)}.

3, DateDiff (Day,updatetime,getdate ()) <7 .... 7 refers to the search for the last 7 days of the article, according to your needs to modify.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.