[MODx] 4. getResources
1. Create a chunk call 'white_content' for white content:
<!-- Highlights -->
<div class="wrapper style3">
<div class="title">The Endorsements</div>
<div id="highlights" class="container">
<div class="row">
[[!getResources?
&parents=`0` // no parent
&resources=`10,11,9`
&debug=`1`
&tpl=`greyhighlight`
&limit=`3` // 0 -- no limit
&depth=`1`
&includeContent=`1`
&includeTVs=`1`
&processTVs=`1`
&showHidden=`1`
]] </div>
</div>
</div>

When we click the button, we want to open a blog page for each button.
Inside chunk we use get resourece:
parent: -1 means refering to 'resources' tag or you give an id

resources: tell which resources you want to use
depth: means we only look for one level folder.
limit: show 3 result
tpl: chunk
More see:http://rtfm.modx.com/extras/revo/getresources
2. Create greyhighlight chunk:
<div class="4u">
<section class="highlight">
<a href="[[~[[+id]]]]" class="image featured"><img src="[[+tv.highlightImage]]" alt="" /></a>
<h3><a href="#">[[+pagetitle]]</a></h3>
<p>Eget mattis at, laoreet vel amet sed velit aliquam diam ante, dolor aliquet sit amet vulputate mattis amet laoreet lorem.</p>
<ul class="actions">
<li><a href="[[~[[+id]]]]" class="button style1">Learn More</a></li>
</ul>
</section>
</div>
'+' means: under current page, looking for the TV.
3. For each blog page:
For example: set TV

4. View the result.
Once you click the image or button, it will navigate to the blog page.
[MODx] 4. getResources的更多相关文章
- Android重写getResources规避用户调整系统字体大小影响Android屏幕适配
Android屏幕适配一直是一个头疼的问题.除此之外还要考虑APP在实际应用场景中,用户千奇百怪的设置,最常见的用户设置行为就是设置手机的字体大小,比如把字体设置成超大或者超小,这对屏幕适配又带来额外 ...
- Android 非Activity类引用getResources()方法问题的解决方法
在进行Android开发的过程中,在一个非Activity类(此处假设类名为MyNewClass)中引用了getResources()方法,如下: Bitmap bmp = BitmapFactory ...
- [MODX] 2. Chunks $
Chunk in Modx can cut your template into samll pieces to make code reuseable. [[$chunk_name]] For ex ...
- [MODX] 0. Mangement System Overview
In Modex, there are three tabs: Resoources, Elements & Files First: 'Files' is the place where t ...
- [MODx] 1. Add Html5 template into the MODx
1. Connet MODx by SSH: Go to the MODx cloud; Find you current user and right click selet Edit Cloud; ...
- [MODx] 8. Snippet get data, chunk display
Simple Example: Lets process this chunk and output its value. We have this Chunk, called "Welco ...
- [MODx] 7. MIGX DB
MODx provides a really unfriendly way to work with xPDO class. What I means is you need to define XM ...
- [MODx] 5. WayFinder
1. Install the wayFinder package 2. Select the resource which you want to show: The 'published' reso ...
- [MODx] Build a CMP (Custom manager page) using MIGX in MODX 2.3 -- 1
BIG FUCK for MODx MODx document is not that good ... at least in my opint of view. I spend hours t ...
随机推荐
- bzoj题解
bzoj1012 线段树水题 bzoj1207 LIS水题 bzoj2190 挡住,即 bzoj1601 已被删除的水题? bzoj1607 线段树细节题,搞清楚特判即可 bzoj1008 快速幂妥妥 ...
- poj12月其他题解(未完)
最近编程的时间比较少啊…… poj3253 就是个合并果子,各种优先队列即可(显然单调队列最优) poj3263 线段树统计每个点被覆盖了多少次即可,注意要去重 poj3625 最小生成树 poj36 ...
- Weblogic11g安装
我们在64位的服务器上为提高性能要安装64位的weblogic.经常在网上看到有人问,weblogic有64位的么?weblogic需要破解么? weblogic有专门的64位版本,这里安装的是web ...
- (四)学习CSS之position、bottom、left、right和top属性
参考:http://www.w3school.com.cn/cssref/pr_class_position.asp position 属性规定元素的定位类型. 这个属性定义建立元素布局所用的定位机制 ...
- 黑盒测试用例设计方法&理论结合实际 -> 边界值分析法
一. 概念 边界值分析法就是对输入或输出的边界值进行测试的一种黑盒测试方法.通常边界值分析法是作为对等价类划分法的补充,这种情况下,其测试用例来自等价类的边界. 二. 边界值分析法的应用 根据大量的测 ...
- PHP 实现短域名互转
/** * 短域名生成&解析类 */ class Build_URL { private $mem; private $base_url = 'http://xxx.com/'; public ...
- htmlcss笔记--a
a标签 1.下载:href里面放一个文件或者压缩包时,会下载: 2.锚点:跳转到锚点: href="#id" 跳转到的模块添加一个id,点击id就会跳转到该模块. html标签: ...
- lcov收集覆盖率
1.gcov 1.1 什么是gcov 首先我们要了解什么是gcov,gcov伴随gcc 发布.gcc编译加入-fprofile-arcs -ftest-coverage 参数生成二进制程序,执行测试用 ...
- cocos2d-x编译到android平台后,增加返回键和菜单键支持
在头文件中增加函数 virtual void keyBackClicked();//android返回键 virtual void keyMenuClicked();//android菜单键 在ini ...
- 谈谈Nginx有哪些特点
1.热部署 我个人觉得这个很不错.在master管理进程与worker工作进程的分离设计,使的Nginx具有热部署的功能,那么在7×24小时不间断服务的前提下,升级Nginx的可执行文件 ...