In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to use custom tags in cms to achieve the effect of [!-newsnav--]? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Want to modify [!-- newsnav--] for example, want to remove the link of "Home > Jinhu Station > Water Conservancy News" and the big column "Jinhu Station" to modify the e/class/connect.php file, ReturnClassLink () this method.
Here is a custom tag to achieve the effect of [!-- newsnav--]. If you want to modify it, it is easy to do so.
Step 1: add the following function to e/class/userfun.php, which takes only one argument, the current ID
/ / current location navigation function user_linknav ($classid) {global $empire,$dbtbpre; $query= "select classname,bclassid,classpath from {$dbtbpre} enewsclass where classid=". $classid; $sql=$empire- > query ($query); / / echo "Home Page"; while ($ringing empires-> fetch ($sql)) {findparent ($r [breadd]) Echo ">". $r [classname]. ";} / / current location navigation, recursively query parent column function findparent ($classid) {global $empire,$dbtbpre; $query=" select classname,bclassid,classpath from {$dbtbpre} enewsclass where classid= ". $classid; $sql=$empire- > query ($query) While ($ritual empires-> fetch ($sql)) {findparent ($r [bounded]); echo ">". $r [classname]. ";}}
Step 2: add the tag in the module management. The tag symbol is linknav, the function name is user_linknav, and the format of the tag is [linknav] column ID [/ linknav].
Step 3: add the template variable nav, which reads "your current location: [linknav] $globals [navy] [/ linknav]"
At the end. You just need to call the template variable [!-- temp.nav--] in the template. The specific style can be put in a div [!-- temp.nav--]. Then set the style of div, or you can modify the functions under userfun. The function is simple. Is to query recursively according to the current column.
After reading the above, do you know how to use custom tags in cms to achieve the effect of [!-newsnav--]? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.