FavoriteLoading
0

ZBLOG文章页面隐藏网址后面id的效果

导航调用分类和文章

  {php}$SetindexIDs=explode(',',$zbp->Config('yinhuashu')->catalogue);{/php}

{foreach $SetindexIDs as $key=>$bid}{$i=$key+1}
{if isset($categorys[$bid])}
 <li ><a  style='height: 44px;line-height: 36px;padding-left: 10px;color: #fff;border-top: 1px solid #fff;background: #1b598f;cursor: pointer;font: normal 16px/44px "Microsoft YaHei";' class="has-child" node="10000{$categorys[$bid].ID}" ><i class="x-icon"></i><span>{$categorys[$bid].Name}</span></a>
 <ul>
 {foreach GetList(100,$bid,null,null,null,null,array('has_subcate'=>'ture'))as $key=>$post}
 <li style='height: 35px;line-height: 34px;border-bottom: 1px #ccc dashed;font-family: "Microsoft YaHei";font-size: 14px;'>
<a href="javascript:void(0);" onclick="click1('{$post.ID}');" class="" style="padding-left:25px;
{if $post->Metas->fcolor}color:{$post->Metas->fcolor}{/if}" level="1" node="{$post.ID}" href="{$post.Url}">
<i class="x-icon"></i><span>{$post.Title}</span></a></li>
               
{/foreach}
           
</ul>
         
</li>
{/if}

{/foreach}

首页中间调用文章内容

{$zbp->Config( 'yinhuashu' )->shouyecon}
{php} $array = explode(',',$zbp->Config('yinhuashu')->helpintro); {/php}
{foreach $array as $key=>$id}
{$post=GetPost((int)$id);} {$post.Content}
{/foreach}

js代码

<script>
function click1(id){
$(".whyy").html("加载中...");
  $.get("/?id="+id,function(data,status){
    $(".whyy").html(data);
  });

}
</script>