phpcms多个栏目调用

做网站时用的到的简单的栏目导航()

phpcms多个栏目catid in(9,10,11)可以修改id

排序order by listorder ASC/DESC

{if}...{/if}为判断点击为栏目

下面是一种例子

html:

<div style="width:1000px;height:45px;" class="dh">
<ul>
<li class="navb"><a href="{siteurl($siteid)}" {if !$catid}class="hover"{/if} class="nhome">网站首页</a></li>
{pc:get sql="select * from v9_category where catid in(9,10,17,11,12,13,14,15) order by listorder ASC" siteid="$siteid"  return="data"}
    {loop $data $r}
<li class="navb"><a href="{$r[url]}" {if $catid == $r[catid] || $top_parentid == $r[catid]} class="hover"{/if} class="nabout">{$r[catname]}</a></li>
    {/loop}
{/pc}
</ul>
</div>

css:

.navb{float: left;
     height: 38px;
     line-height: 38px;
     margin-top: 4px;
     width: 99px;}

.nabout{color:#fff; 
       font-size:14px; 
       display:inline-block; 
       width:99px; 
       text-align:center; 
       text-decoration:none;
       height:38px;line-height:38px;
       font-weight:bold;
       }
.nabout:hover{width:99px;
       color:#067300; 
       background:url(navb.jpg) repeat-x;
       display:inline-block; 
       height:45px;line-height:38px; 
       text-decoration:none;  
       margin:0px; font-weight:bold;}

.nhome{width:99px;
      color:#fff; 
      /*background:url(navb.jpg) repeat-x;*/
      display:inline-block; 
      height:45px;line-height:38px; 
      margin:0px;
      text-decoration:none;
      font-size:14px;font-weight:bold;
      }
.nhome:hover{text-decoration:none;
      display:inline-block; 
      width:99px; 
      color:#067300; 
      font-size:14px;
      background:url(navb.jpg) repeat-x;
      height:45px; 
      line-height:38px;font-weight:bold;
      }
.hover{width:99px;
       color:#067300; 
       background:url(navb.jpg) repeat-x;
       display:inline-block; 
       height:45px;line-height:38px; 
       text-decoration:none;  
       margin:0px; font-weight:bold;
       font-size:14px;}
       
.hover:hover{text-decoration:none;
      display:inline-block; 
      width:99px; 
      color:#067300; 
      font-size:14px;
      background:url(navb.jpg) repeat-x;
      height:45px; 
      line-height:38px;font-weight:bold;
      }   

效果:

原文地址:https://www.cnblogs.com/chervehong/p/10373277.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


本教程操作系统:Windows10系统、phpcms 9版本、Dell G3电脑。PHPcms排序的作用是什么?
PHPcms访问特点:单一入口模式。无论访问任何一个模块或者功能,只有一个统一的入口。参数名称描述位置m模型/模块名称phpcms/moudles中的模块目录名称c控股器名称phpcms/moudles/模块/*.php文件名称a事件名称phpcms/moudles/模块/*.php中的方法名称例子:
例如:{pc:contentaction="position"posid="2"order="listorderDESC"num="4"}后台-推荐位管理(左边栏最下方),里面可以自定义ID下面为默认的:在V9的后台添加文章页面中的源代码中得知推荐位有5种类型:1首页焦点图推荐2首页头条推荐9网站顶部推荐10栏目首页推荐12首页图片推荐
首先,上图之中的红色框框是没有的,我们想要给他加上,当然是要改HTML页面啦,废话,我们跟ECSHOP一样由PHP路径找模板;看看路由原理:   首先,上图之中的红色框框是没有的,我们想要给他加上,当然是要改HTML页面啦,废话,我们跟ECSHOP一样由PHP路径找模板;看看路由原理: 再看看这个板块的
头部<metaname="keywords"content="{$SEO['keyword']}"/><metaname="description"content="{$SEO['description']}"/><title>{ifisset($SEO['title'])&&!empty($SE
做网站时用的到的简单的栏目导航()phpcms多个栏目catidin(9,10,11)可以修改id排序orderbylistorderASC/DESC{if}...{/if}为判断点击为栏目下面是一种例子html:<divstyle="width:1000px;height:45px;"class="dh"><ul><liclass="navb"><ahref=&quot
首先在phpcms/libs/functions/extention.func.php里面写入判断手机访问的自定义函数?123456789101112131415161718192021222324252627282930313233343536373839<?php/** *extention.func.php用户自定义函数库 * *@co
phpcmsv9和dedecms自带的编辑器都是使用的ckeditor,在默认情况下使用ckeditor编辑内容时,按下回车键后在源代码显示的是<br>而非<p>标签,对于习惯于换行为p标签的我来说极为不便。phpcmsv9编辑器ckeditor设置回车换行<br>为段落<p>标签修改方法:在\statics\js\ckeditor\config.js
原文链接:http://www.cnblogs.com/Republic/p/4783705.htmlPHPCMS后台框架实现思路【原创】时间 2014-11-2710:12:19极客头条原文 http://blogs.zmit.cn/3589.html1.打开后台入口文件admin.phpheader('location:index.php?m=admin');跳转到in
加载系统类方法load_sys_class($classname,$path=‘’",$initialize=1)系统类文件所在的文件路径:/phpcms/libs/classes/文件夹下参数说明:@paramstring$classname类名@paramstring$path扩展地址@paramintgerinitialize是否初始化如要调用系统Form类的生
**1.F:…\caches\configs\route.php文件中配置路径2.F:…\caches\configs\url_route.php配置第二个站点的301跳转,根据站点id加载不同的路由.3.删除入口的加载文件4创建…phpcms\modules\content\classes\template_style.class.php由$_SERVER[‘HTTP_HOST’]
如下图所示功能: 首先,用下面这些代码替换掉phpcms/libs/functions/extention.func.php的内容<?php/***extention.func.php用户自定义函数库**@copyright(C)2005-2010PHPCMS*@licensehttp://www.phpcms.cn/license/*@lastmodify
头部<metaname="keywords"content="{$SEO['keyword']}"/><metaname="description"content="{$SEO['description']}"/><title>{ifisset($SEO['title'])&&!empty($S
今天修改一位客户的phpcms网站,他要求添加https,这对ytkah来说是轻车熟路了,但是后台稍微有点问题,点击分页出现错误,将鼠标移到下一页显示的链接是https://www.abc.com/www.abc.com/index.php?m=content&c=content&a=init&menuid=822&catid=37&pc_hash=GsxXx8&page=2,很明显是多了一
location/{if(!-f$request_filename){rewrite(.*)/index.php;}rewrite^/caipu-([0-9]+)-([0-9]+)-([0-9]+).html/index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3last;rewrite^/content-([0-9]+)-([0-9]+)-([0-9]+).html/ind
PHP打印方法: {php&#160;print_r(变量);} {php&#160;print_r(变量);} &lt;?php&#160;print_r(变量);?&gt; 1. &lt;div
调用一级栏目名称跟二级栏目名称:
phpcms如何修改图片水印呢1、首先准备一张水印图片,命名为mark png(名字随意),放到网站根目录statics images water 文件夹下2、进入网站后台,单击 设置->站点管理,修改站点,如下图所示,进行相关参数设置即可
就目前phpcms2008下PHPCMS绑定二级域名地址不正确问题分析,在生成栏目的url时有bug,如下所示:比如当栏目wfuyu 绑定二级域名为http: wfuyu phpcms com存在路径为 parentdir=& 39;ja ywja ydzd