


How to add the notypeid attribute to the DreamWeaver artlist tag to implement column filtering
How to add the notypeid attribute to the DreamWeaver artlist tag to implement column filtering?
DreamWeaver's tag function is very powerful. As long as you are familiar with these tags, you will be able to call various forms of background data in the foreground with ease. Of course, it would be even more perfect if we could understand some technology and improve the label of DreamWeaver.
Recommended study: 梦Weavercms
I have recently been expanding and subdividing the columns of my small site, from the original seven first-level columns to ten Two first-level columns, each first-level column is further subdivided into four to eight second-level columns for better content management.
But I encountered a problem. I don’t want one of the columns to be displayed in the latest article list on the homepage. According to DreamWeaver’s existing method, it is to change the typeid attribute of the arclist tag to display the article. All column IDs are set, but there are too many column IDs, which will be troublesome to maintain in the future, so I think since arclist supports flag and noflag, it should also support typeid and notypeid, right?
After some testing and tracing the source code, I found that Notypeid is not supported by Dreamweaver. What should I do? Write it yourself!
Open the /include/taglib/arclist.lib.php file and look for this code (about line 130):
return lib_arclistDone ( $refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen, $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby, $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid, $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'), $tagid,$pagesize,$isweight );
Add at the end of the last bracket (note the comma in front):
,$ctag->GetAtt('notypeid')
Then find this piece of code (about line 168):
function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160, $imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='', $innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='', $order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0, $isweight='N')
Add at the end of the brackets (note the comma in front):
,$notypeid=0
Finally find it again This sentence:
$orwheres[] = ' arc.arcrank > -1 ';
Add the following code in front of it:
if(!empty($notypeid)) { $orwheres[] = " and arc.typeid NOT IN (".GetSonIds($notypeid).")"; }
In this way, the code is modified. After saving, try the notypeid attribute in the arclist tag. For websites with many columns and complicated content display, this attribute is quite practical.
Usage:
The code is as follows:
{dede:arclist row=6 orderby=pubdate type='image.' imgwidth='108' imgheight='150' channelid='1' notypeid='9'}
The above is the detailed content of How to add the notypeid attribute to the DreamWeaver artlist tag to implement column filtering. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Linux new version
SublimeText3 Linux latest version

Atom editor mac version download
The most popular open source editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version
God-level code editing software (SublimeText3)