emlog The tag function in the program is very powerful. If you add tags to published articles, you can use tags as keywords of emlog articles, and tags can also be used as categories or albums of emlog. With such a powerful tag function, how can you add tags to Emlog template Output display tag article list? Emlog template What is the tag article list calling code?
emlog Template The tag article list calls the code, and copies the following code to the emlog template module php In the file, write the calling code where the emlog template needs to, and then the emlog template can output and display the list of tag articles.
function lanyeTagArticle($tagname,$num=10,$page=1){ $Tag_Model = new Tag_Model(); $Log_Model = new Log_Model(); $blogIdStr = $Tag_Model->getTagByName($tagname); $sqlSegment = "and gid IN ($blogIdStr) order by date desc"; $list = $Log_Model -> getLogsForHome($sqlSegment, $page, $num); $out = ''; foreach($list as $v){ $out .='< li><a href="'. Url::log($v['gid']).' ">'.$v['title'].'</a></li>'; } return $out; }
Disclaimer:
Website: Click Copy to share with friends!
All content resources shared by this website, if not noted, are original by Blueleaf. If you need to reprint, please indicate the source; Please contact us in case of infringement Contact handling 。 Please understand!