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. 函数hash_get_nth_cell

    /************************************************************//** Gets the nth cell in a hash table. ...

  2. 【转】Cygwin的包管理器:apt-cyg

    原文网址:http://zengrong.net/post/1792.htm Cygwin的包管理工具setup.exe实在是难用的让人蛋碎.于是就有了这样一个apt-cyg,可以提供类似于 apt- ...

  3. [转] 三种Python下载url并保存文件的代码

    原文 三种Python下载url并保存文件的代码 利用程序自己编写下载文件挺有意思的. Python中最流行的方法就是通过Http利用urllib或者urllib2模块. 当然你也可以利用ftplib ...

  4. MFC程序运行流程

    ->进入入口函数_tWinMain() 程序首先进入文件AppModul.cpp,找到_tWinMain()函数运行,调用其中的AfxWinMain()函数. 由于为了支持UNICODE,C运行 ...

  5. 【转载】chmod u+s

    转自:http://blog.chinaunix.net/uid-26642180-id-3378119.html Set uid, gid,sticky bit的三个权限的详细说明 一个文件都有一个 ...

  6. weiphp3.0(thinkphp)的调整之路

    weiphp是在thinkphp的基础上开发的简洁强大开源的微信公众平台开发框架,其宣称微信功能插件化开发,多公众号管理,配置简单. 但是关于weiphp的文档使用一是内容真不多,二是写的也不详细. ...

  7. HTML-css selector

    Css selector 基本有三种 HTML(TAG)selector , ID selector , Class selector css selector 综合使用 : 重用,子选择器,组选择器 ...

  8. leetcode@ [241] Different Ways to Add Parentheses (Divide and Conquer)

    https://leetcode.com/problems/different-ways-to-add-parentheses/ Given a string of numbers and opera ...

  9. HDU-4669 Mutiples on a circle 环形DP

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4669 题意:给一串数字连乘一个环,求连续的子串中组成的新的数字能被K整除的个数. 首先容易想到用DP来 ...

  10. 常用Raspberry Pi周边传感器的使用教程

    在Raspberry Pi 的使用和开发过程中,你可能时常需要一些硬件和传感器等来支持你的开发工作,例如,加入一个超声波测距的模块来让你的Raspberry Pi具备测距功能,加入一个测温模块以实现测 ...