phpcms图片模型调用组图的问题
phpcms里面有个图片模型,之前一直没有用过,之前用的轮播图是用文章+缩略图+推荐位实现的
今天看了一下图片模型添加内容的地方,和平常的文章相比多了一个组图的地方:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApQAAACWCAIAAADv+o9JAAAWnUlEQVR4nO2dMbKEunKGWRRLcOhdsIhb5SW4ahbwFkLmRTiesgOXoxv4BTe6GQ7OGWhJ3VILGEDwfTV1ahBI3Y0YfrXEnOn+CQAAAE3RTQAAANAUiDcAAEBjIN4AAACNgXgDAAA0BuINAADQGIg3AABAYyDeAAAAjYF4AwAANAbiDQAA0BiINwAAQGMg3gAAAI2BeAMAADTGU8S7/7f/Lr7ydWttbW8HAABA5UHi/a///j/z+0hEo5L85mQMBTLH58sBAACqeJx4q6JbK975w2T5ulwfAAAgw7PEO1LNA8Q7czwAAMA6niXe83tLxdMDitPjP69//Mc/80MB0m4AANiLxsT7v/73//Ivq6IqnLWL1mmD8/uMeFc1WxUsL168ePF65qs98V5XUdVsdW+6qbYWqbUq3vkMnvwbAADW8UTxTktWT3TPsl3MvKNjAAAAVvM48VaVuJh5Z0TXSrijY+Sz7sU2AQAAMjxOvOWmqqNW3uxfxlZtycflSMEBAGALzxJvz/KzX7yLit6LB9HnL6plKgIAAHh4lngX9/oz7IycWwdnUn8AAAA/TxFvAACA24B4AwAANAbiDQAA0BiINwAAQGMg3gAAAI2BeAMAADQG4g0AANAYiDcAAEBjIN4AAACNgXgDAAA0BuINAADQGIg3AABAYyDeAAAAjYF4AwAANAbiDQAA0BiINwAAQGMg3gAAAI1xQ/H+TwBoDT7RINlPNG7LPcX7TwBoh/zNmk/000C8PdxTvP8CgHYoivfZDsKhIN4e7inefwNAOxTF+2wH4VAQbw/3FO8DPAGAvSiK92GewBWgxz0g3gBwMog3SOhxD4g3AJwM4g0SZ493//KP6I3z+HvwDPF+v/quf72/4lJgRRr52dzR9NzUV8OJolhR/YBT7WFdIHv5L9sZh67ruq4bXvU9uLE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TJ9+nkMw1nKteW+4xN675qpjarcYVkgtNdxfOZMUDa9YMeeZb4K3zDPFeR37a7UNeu1uhUbdTvIH4OvcsDu6O083xH9ZAUvU9b1WJ1bz8Hpo9g3jbuO7vaPelcAdyafE+XUyPNod4g4Qe94B4A8DJIN4gocc9IN4AcDKIN0jocQ+INwCcDOINEnrcA+INACeDeIOEHvdwT/EGgLbgEw2S/UTjttxQvAEAAO4N4g0AANAYiDcAAEBjIN4AAACNgXgDAAA0BuINAADQGP8P0ZvMI7vtBu8AAAAASUVORK5CYII=" alt="" />
也即可以用一篇文章管理多个图片吧
那么我前台需要一个轮播图实现动态展示,怎么调用呢?
本来我是这样调的:因为只有一个文章在返回值$data里,而且键值是id,所以$data[1],注意需要调用副表,就是那个moreinfo="1"
{pc:content action="lists" catid="11" order="id DESC" moreinfo="1" return="data"}
{loop $data[1][pictureurls] $r}
<li class="on">
<div class="txt_box">
<div class="tit"><img src="{$r[url]}" alt="{$r[alt]}" /></div>
</div>
</li>
{/loop}
{/pc}
结果竟然不显示!!!
var_dump了一下$data[1][pictureurls],没问题啊,可以出来啊!真奇怪
然后查了半天,猛然看到var_dump($data[1][pictureurls])的类型是String。。。
好吧,怪不得呢,记得phpcms全局函数库中有string转array的,查了一下,是string2array方法
然后改成这样调:
{pc:content action="lists" catid="11" order="id DESC" moreinfo="1" return="data"}
{loop string2array($data[1][pictureurls]) $r}
<li class="on">
<div class="txt_box">
<div class="tit"><img src="{$r[url]}" alt="{$r[alt]}" /></div>
</div>
</li>
{/loop}
{/pc}
OK了~
phpcms图片模型调用组图的问题的更多相关文章
- phpcms v9手机站不支持组图($pictureurls)的修改
phpcms v9自带的手机门户网站,有时候我们需要用到组图功能$pictureurls,我在做的时候发现,如果$pictureurls中只有一张图片会正常显示,但是如果有两张或两张以上的图片的时候, ...
- 齐博x1标签实例:做模板组图单图无图混排的处理
代码如下, {qb:tag name="xxx" type="cms" rows="10"} {if ( count($rs['picurl ...
- jq demo 轮播图,图片可调用,向左,自动+鼠标点击切换
<!doctype html> <html> <head> <meta http-equiv="Content-Type" content ...
- jq demo 轮播图,图片可调用,向上,自动+鼠标点击切换
1 <!doctype html> <html> <head> <meta http-equiv="Content-Type" conte ...
- phpcms v9 常用调用标签(全)
本文介绍phpcms v9中模板标签使用说明. {template ) {==} {/,,)} loop是data的时候用{thumb($v[thumb],,)} 分页标签------{$ ...
- PHPCMS v9 模型概念及用法
phpcms v9 模型概念 一.什么是模型? 模型是系统知识的抽象表示.我们不能仅仅通过语言来描述一个系统,也不能仅仅通过记忆来记录关于系统的知识.知识是通过某种媒介来表达的,这种媒介所表达的内容就 ...
- android 项目学习随笔十七(ListView、GridView显示组图)
ListView.GridView显示组图,处理机制相同 <?xml version="1.0" encoding="utf-8"?> <Li ...
- android124 zhihuibeijing 新闻中心-组图
package com.itheima.zhbj52.base.menudetail; import java.util.ArrayList; import android.app.Activity; ...
- 极简的js点击组图切换效果
程序员进行前端开发时,时常要用到点击切换组图的动画效果,网上确实有很多此类插件,但是都很麻烦,乌糟糟无数代码,有那个看的时间,自己都能把功能写完了.在这里我提供一段极简的js点击组图切换效果代码,包含 ...
随机推荐
- Webpack 之 Loader 的使用
安装 loaders 如果loader在npm里,可以这样安装: $ npm install xxx-loader --save 或者 $ npm install xxx-loader --save- ...
- 谈谈我对PhoneGap的看法——(摘自唐巧的技术博客)
源地址:http://blog.devtang.com/blog/2012/03/24/talk-about-uiwebview-and-phonegap/ 主题部分 我认为PhoneGap有以下3大 ...
- 2015 前端[JS]工程师必知必会
2015 前端[JS]工程师必知必会 本文摘自:http://zhuanlan.zhihu.com/FrontendMagazine/20002850 ,因为好东东西暂时没看懂,所以暂时保留下来,供以 ...
- centos 7.0 修改ssh默认连接22端口 和 添加防火墙firewalld 通过端口
首先 先做的就是 修改ssh的默认端口22 需要修改文件 /etc/ssh/sshd_config 使用命令 vi /etc/ssh/sshd_config [root@localhost ~]# v ...
- array_map()与array_shift()搭配使用 PK array_column()函数
array_map()与arra_shift()搭配使用,还是来看例子吧,比较直观一点 <?php $user = array( 0 => array( 'name' => '张三' ...
- Java多线程编程核心技术---Java多线程技能
基本概念 进程是操作系统结构的基础,是一次程序的执行,是一个程序及其数据结构在处理机上顺序执行时所发生的活动,是程序在一个数据集合上运行的过程,是系统进行资源分配和调度的独立单位.线程可以理解成是在进 ...
- Spring4学习笔记-AOP
1.加入jar包 com.springsource.org.aopalliance-1.0.0.jar com.springsource.org.aspectj.weaver-1.6.8.RELEAS ...
- C# Thread挂起线程和恢复线程
前言 众所周知,Thread类中的挂起线程和恢复线程微软已标记过时,因为可能会造成问题 Resume() 恢复当前线程 已过时. Resumes a thread that has been ...
- iOS数据库学习(1)-安装Navicat
1.下载Navicat Premium 11.0.16.dmg 已经放到百度网盘,里面有安装文件和注册机 下载链接: http://pan.baidu.com/s/1sjI64HZ 密码: 2h7q ...
- android-android获取navigationview 上的控件id
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); View headerView = navi ...