PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

副栏目点进去显示信息不存在 [复制链接]

1#
如题,以下为信息表栏目代码。
@{
    int columnId = Html.CurrentColumnId();//当前栏目id
    PageInfo pageInfo = new PageInfo()
    {
        PageSize = 12,//每页显示12条数据
        CurrentPage = (int)ViewBag.CurrentPage //当前页码,系统预设
    };
    var columnContentData = Html.ColumnContentData(columnId);
    string templateDirectory = ViewBag.TemplateDirectory;
    string zdytitle = columnContentData.Zdytitle;
    var dataList = Html.InfoDataList(new { ColumnId = columnId, OrderBy = "thedate desc",ShowSubColumnData=1 }, null, null, pageInfo);
    int number = 0;
}

<div class="webcontent">
    <div class="container">
        <div class="row">
            <div class="web_navs1 col-xs-12 col-sm-3">
                @Html.Partial("subNavPartial")
            </div>
            <div class="col-xs-12 col-sm-9">
                <div class="row">
                    @{ foreach (dynamic item in dataList)
                        {
                            string url =Html.InfoDataUrl((object)item,false,false);//获取内容页地址
                            string thumbnail = item.Thumbnail;
                            string date1 = item.Thedate.ToString("dd");
                            string date = item.Thedate.ToString("yyyy/MM");
                            string date2 = item.Thedate.ToString("yyyy/MM/dd");
                            string introduction = item.Introduction;
                            number++;
                            if (number <= 1)
                            {
                        <div class="jy_news_mxlist row">
                            <div class="col-xs-12 col-sm-5 pics">
                                <a href="@url"> <img src="@thumbnail" alt="@item.Title"/></a>
                            </div>
                            <div class="col-xs-12 col-sm-7 coms">
                                <div class="dates">@date2</div>
                                <a href="@url" class="titles">@item.Title</a>
                            </div>
                        </div>
                            }
                         else
                        {
                        <div class="jy_news_mxlists row">
                            <div class="col-xs-12 col-sm-8 coms">
                                <a href="@url" class="titles">@item.Title</a>
                                <div class="times"><span class="s1">@date1</span><span class="s2">@date</span></div>
                                <div class="times2">@date2</div>
                                <div class="jianjie">@item.Introduction</div>
                            </div>
                            <div class="col-xs-12 col-sm-4 pics">
                               <a href="@url"><img src="@thumbnail" alt="@item.Title" /></a>
                             </div>
                        </div>
                             }
                         }
                      }
                 </div>
             </div>
        </div>
    @Html.Partial("PagebreakPartial", pageInfo)
    </div>
</div>
分享 转发
TOP
2#

出错的页面地址发出来
TOP
3#

回复 2楼xiyou的帖子

HTTP 错误 404.0 - Not Found
您要找的资源已被删除、已更名或暂时不可用。


最后编辑jingyi 最后编辑于 2022-02-21 10:48:17
TOP
4#

回复 2楼xiyou的帖子



h后台报错
TOP
5#

这个问题只看截图看不出来原因,估计是模板少写了分号或大扩号之类的导致错误
TOP
6#

回复 5楼xiyou的帖子

模板代码已经在帖子里面。这个本站点应用是可以点开来的,到了其他站点使用副栏目就不行了。
TOP
7#

回复 5楼xiyou的帖子

版主帮忙看看,什么原因呢?
TOP
8#

这个找不到原因,打不开的话也不关模板的事情,应该是系统底层代码问题,但是测试了新版本跨站推送副栏目也没有这个问题。
TOP
发新话题 回复该主题