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. bzoj1098 1301

    这两题很类似,都是在补图上搜索 但是由于补图太大我们不能建出来 考虑先从一个点搜,每次搜可以搜的点, 然后维护一个链表,记录当前还没有搜过的点,搜过之后从链表中删除即可 type node=recor ...

  2. php简单实现MVC

    在PHP中使用MVC越来越流行了,特别是在一些开源的框架当中.MVC足以应对大多数的情况,但还有一些情况是其不太适合的,如比较简单的个人博客,对于只有几百篇文章量级的博客,使用MVC让人觉得有些太复杂 ...

  3. Git 基础 - Git Aliases

    $ git config --global alias.co checkout $ git config --global alias.br branch $ git config --global ...

  4. use vagrant under win7

    1.下载安装最新版的vagrant 和 visualbox 到https://vagrantcloud.com/search 搜索要的linux发行版,比如ubuntu 我们用最上面这个版本做测试 拷 ...

  5. C++空类以及没有成员变量的类的大小

    关于C++中空类的大小为1,我们大家都有所了解,但是除了空类之外的其他一些没有成员变量的类的大小,还是有很多不明之处的. 我们来看如下一个例子: #include<iostream> us ...

  6. 【OpenGL】画立方体

    编写一个程序,该程序运行时可以用鼠标的一个按键调整立方体的方向,用另一个按键平移立方体,用第三个按键缩放立方体. 这是题目,我的程序不一定完全按照这个来.初学OpenGL,对那一堆坐标系表示十分混乱, ...

  7. 广州大学华软软件学院——NA视频下载

    准备工具: 360极速浏览器(不要认错图标了): 浏览器视频下载插件: 第一步:安装浏览器插件 1.打开浏览器 2.解压,找到插件文件: 3.把插件拖到浏览器中: 4.添加,然后就完成了插件安装 查看 ...

  8. Send email alert from Performance Monitor using PowerShell script (检测windows服务器的cpu 硬盘 服务等性能,发email的方法) -摘自网络

    I have created an alert in Performance Monitor (Windows Server 2008 R2) that should be triggered whe ...

  9. Scott Hanselman's 2014 Ultimate Developer and Power Users Tool List for Windows -摘自网络

    Everyone collects utilities, and most folks have a list of a few that they feel are indispensable.  ...

  10. TCP/IP模型的简单解释

    TCP/IP模型是互联网的基础.想要理解互联网,就必须理解这个模型.但是,它不好懂,我就从来没有搞懂过. 前几天,BetterExplained上有一篇文章,很通俗地解释了这个模型.我读后有一种恍然大 ...