muban大师 发表于 2021-7-21 09:44:47

Dede中SQL调用简略标题shorttitle和链接地址

用sql调用有shorttitle的文章,并获得文章静态地址链接
       
        为了用这个效果,搞了2个小时,晕死了。
       
        目的:实现首页所需要的多篇头条文章,并行出现,节省页面空间(原文标题太长)
       
       
               
                       
                               
                                       
{dede:sql sql="select id,shorttitle from dede_archives where shorttitle!='' order by id desc limit 0]10"}

{/dede:sql}
                               
                       
               
       

       
        说明:关于静态地址的获取,借用了他人的方法。
页: [1]
查看完整版本: Dede中SQL调用简略标题shorttitle和链接地址