In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the method of Weaving Dream cms to get the current column path. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
How does dream weaving cms get the current column path?
Dream weaving cms gets the label call and top-level column of the current column path and column name.
:
When we use some websites, we often encounter when we need to call the top-level column name of the current column, Zhimeng default {dede:field name='typename' /} can get the name of the top-level column on the current column page, rather than the top-level column name of the current column.
Here is a way to achieve this effect:
At the bottom of the include/common.func.php, add:
The content comes from
Top column name
Function GetTopTypename ($id) {global $dsql; $row = $dsql- > GetOne ("SELECT typename,topid FROM jiemou_arctype WHERE id= $id"); if ($row ['topid'] = =' 0') {return $row ['typename'];} else {$row1 = $dsql- > GetOne ("SELECT typename FROM jiemou_arctype WHERE id= $row [topid]"); return $row1 [' typename'];}}
When calling on the article page or column list page, add the following line of code to the location of the column name you want to call. The content comes from
{dede:field name='typeid' function= "GetTopTypename (@ me)" /} content comes from
In the article page, use the following method to call
Gets the parent column of the current column
Write a function and put it in the include/extend.func.php file
Function GetParentCategoryNameByID ($CurrentID) {$tsql = new DedeSql (false); $typelink2 =''; $tsql- > SetQuery ("Select i.typedirgy i.typename From zz5unet_arctype t left join zz5unet_arctype ion i.id=t.reid where t.idtypename ID'"); $tsql- > Execute ('t'); while ($row = $tsql- > GetArray ('tweak tsql-)) {$typelink2. = $row [' typename'];} return $typelink2;}
Calling method: {dede:field name='id' function='GetParentCategoryNameByID (@ me)'/}
On Weaving Dream cms access to the current column path to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.