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的更多相关文章

  1. Android重写getResources规避用户调整系统字体大小影响Android屏幕适配

    Android屏幕适配一直是一个头疼的问题.除此之外还要考虑APP在实际应用场景中,用户千奇百怪的设置,最常见的用户设置行为就是设置手机的字体大小,比如把字体设置成超大或者超小,这对屏幕适配又带来额外 ...

  2. Android 非Activity类引用getResources()方法问题的解决方法

    在进行Android开发的过程中,在一个非Activity类(此处假设类名为MyNewClass)中引用了getResources()方法,如下: Bitmap bmp = BitmapFactory ...

  3. [MODX] 2. Chunks $

    Chunk in Modx can cut your template into samll pieces to make code reuseable. [[$chunk_name]] For ex ...

  4. [MODX] 0. Mangement System Overview

    In Modex, there are three tabs: Resoources, Elements & Files First: 'Files' is the place where t ...

  5. [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; ...

  6. [MODx] 8. Snippet get data, chunk display

    Simple Example: Lets process this chunk and output its value. We have this Chunk, called "Welco ...

  7. [MODx] 7. MIGX DB

    MODx provides a really unfriendly way to work with xPDO class. What I means is you need to define XM ...

  8. [MODx] 5. WayFinder

    1. Install the wayFinder package 2. Select the resource which you want to show: The 'published' reso ...

  9. [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 ...

随机推荐

  1. 银行卡luhm校验算法

    /** * 15位银行卡luhm校验算法 * 1.从卡号最后一位数字开始,逆向将奇数位(1.3.5等等)相加. * 2.从卡号最后一位数字开始,逆向将偶数位数字,先乘以2(如果乘积为两位数,则将其减去 ...

  2. 使用SignalR 提高B2C商城用户体验1

    vs2010 使用SignalR 提高B2C商城用户体验(一) 1.需求简介,做为新时代的b2c商城,没有即时通讯,怎么提供用户粘稠度,怎么增加销量,用户购物的第一习惯就是咨询,即时通讯,应运而生.这 ...

  3. android中常用的弹出提示框

    转自:http://blog.csdn.net/centralperk/article/details/7493731 我们在平时做开发的时候,免不了会用到各种各样的对话框,相信有过其他平台开发经验的 ...

  4. 【工具类】如何通过代码安装一个apk文件

    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...

  5. 转载crontab例行工作调度

    转自:http://blog.sina.com.cn/s/blog_95ee143401017y70.html crontab [-e [UserName]|-l [UserName]|-r [Use ...

  6. 【译】 AWK教程指南 3计算并打印文件中指定的字段数据

    awk 处理数据时,它会自动从数据文件中一次读取一条记录,并会将该记录切分成一个个的字段:程序中可使用 $1, $2,... 直接取得各个字段的内容.这个特色让使用者易于用 awk 编写 reform ...

  7. 如何制作网页小动画?——gif or png

    一.场景与动画 为了拉动网站氛围,或者吸引用户浏览焦点,需要使用一些小动画.这种动画不是(gif)单纯的重复,而是需要需要一些控制和交互,比如在动画完成后打开一个对话框.动画有几个基本要素(时间控制, ...

  8. HDU 3289 Cat VS Dog (二分匹配 求 最大独立集)

    题意:每个人有喜欢的猫和不喜欢的狗.留下他喜欢的猫他就高心,否则不高心.问最后最多有几个人高心. 思路:二分图求最大匹配 #include<cstdio> #include<cstr ...

  9. Spark 0.9的安装配置

    一.上传scala2.10.3到linux 下载scala 2.10.3文件.网上的scala-2.10.3.tgz.scala-2.10.3.rpm,前者支持unix,后者专门给linux使用.但我 ...

  10. 恒天云技术分享系列4 – OpenStack网络攻击与防御

    恒天云技术分享系列:http://www.hengtianyun.com/download-show-id-13.html 云主机的网络结构本质上和传统的网络结构一致,区别大概有两点. 1.软网络管理 ...