1. Install login package.

2. Create a Template called 'login':

[[!Login?
&loginResourceId=`13` // means after login, redirect resource 13 page, in our case, redirect to self
]]
<h2>Register</h2> [[!Register?
&submitVar=`registerbtn`
&activationResourceId=`12`
&activationEmailTpl=`myActivationEmailTpl`
&activationEmailSubject=`Thanks for Registering!`
&submittedResourceId=`5`
&usergroups=`Marketing,Research`
&validate=`nospam:blank,
username:required:minLength=^6^,
password:required:minLength=^6^,
password_confirm:password_confirm=^password^,
fullname:required,
email:required:email`
&placeholderPrefix=`reg.`
]] <div class="register">
<div class="registerMessage">[[!+reg.error.message]]</div> <form class="form" action="[[~[[*id]]]]" method="post">
<input type="hidden" name="nospam" value="[[!+reg.nospam]]" /> <label for="username">[[%register.username? &namespace=`login` &topic=`register`]]
<span class="error">[[!+reg.error.username]]</span>
</label>
<input type="text" name="username" id="username" value="[[!+reg.username]]" /> <label for="password">[[%register.password]]
<span class="error">[[!+reg.error.password]]</span>
</label>
<input type="password" name="password" id="password" value="[[!+reg.password]]" /> <label for="password_confirm">[[%register.password_confirm]]
<span class="error">[[!+reg.error.password_confirm]]</span>
</label>
<input type="password" name="password_confirm" id="password_confirm" value="[[!+reg.password_confirm]]" /> <label for="fullname">[[%register.fullname]]
<span class="error">[[!+reg.error.fullname]]</span>
</label>
<input type="text" name="fullname" id="fullname" value="[[!+reg.fullname]]" /> <label for="email">[[%register.email]]
<span class="error">[[!+reg.error.email]]</span>
</label>
<input type="text" name="email" id="email" value="[[!+reg.email]]" /> <br class="clear" /> <div class="form-buttons">
<input type="submit" name="registerbtn" value="Register" />
</div>
</form>
</div> [[!Profile]] <p>Username: [[+username]]</p>
<p>Email: [[+email]]</p>

In the bottom, we call the [[!Profile]] snippet without cache. So every time, we logout, the profile will be clear up.

If we call [[Profile]], then everytime, we logout, the username and email are still there.

Caching

In Evolution, Snippets that need to be processed with each request should be on an uncached page or the Snippet itself should be called uncached: [!snippet!]

In Revolution, any tag can be called uncached by inserting an exclamation point immediately after the double-bracket: [[!snippet]], [[!$chunk]], [[!+placeholder]], [[!*template_var]], etc.

[MODx] 6. Cache '!' with login package的更多相关文章

  1. wine update错误 "the cache has no package" error when wine update is available

    网址:https://bugs.launchpad.net/pipelight/+bug/1318321/

  2. 移动 ProgramData\Package Cache 文件夹

    装完vs2017 发现C盘快木有空间了… 瞅瞅C盘下有啥能删的好释放下空间 就找到了 Package Cache 文件夹,占用空间接近15G… 查查这个文件夹还不建议删除… (http://super ...

  3. Spring Cache抽象详解

    缓存简介 缓存,我的理解是:让数据更接近于使用者:工作机制是:先从缓存中读取数据,如果没有再从慢速设备上读取实际数据(数据也会存入缓存):缓存什么:那些经常读取且不经常修改的数据/那些昂贵(CPU/I ...

  4. 基于Redis的Spring cache 缓存介绍

    目录 Cache API及默认提供的实现 demo 依赖包安装 定义实体类.服务类和相关配置文件 Cache注解 启用Cache注解 @CachePut @CacheEvict @Cacheable ...

  5. 转:Spring Cache抽象详解

    缓存简介 缓存,我的理解是:让数据更接近于使用者:工作机制是:先从缓存中读取数据,如果没有再从慢速设备上读取实际数据(数据也会存入缓存):缓存什么:那些经常读取且不经常修改的数据/那些昂贵(CPU/I ...

  6. guava cache与spring集成

    缓存的背景 缓存,在我们日常开发中是必不可少的一种解决性能问题的方法.简单的说,cache 就是为了提升系统性能而开辟的一块内存空间.在cpu进行计算的时候, 首先是读取寄存器,然后内存,再是硬盘.由 ...

  7. 基于Spring Cache实现二级缓存(Caffeine+Redis)

    一.聊聊什么是硬编码使用缓存? 在学习Spring Cache之前,笔者经常会硬编码的方式使用缓存. 我们来举个实际中的例子,为了提升用户信息的查询效率,我们对用户信息使用了缓存,示例代码如下: @A ...

  8. Debian Customer PPA RFC (by quqi99)

    作者:张华  发表于:2016-01-13版权声明:能够随意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明 ( http://blog.csdn.net/quqi99 ) Pre ...

  9. springboot模板

    1.thymeleaf模板 2.Freemarker模板 Thymeleaf模板 首先导入依赖 <dependency> <groupId>org.springframewor ...

随机推荐

  1. innodb b+树

    http://www.admin10000.com/document/5372.html

  2. C语言中的malloc和free

    最近在研究php自定义函数的实现,其中php自定义函数在传递参数时,是放到人为的一个栈中,这个跟写C程序时,参数入栈的这个栈还不一样,其中延伸到了 malloc 以及free 有人说在free(p)后 ...

  3. apache开源项目--Camel

    Apache Camel 是一个非常强大的基于规则的路由以及媒介引擎,该引擎提供了一个基于POJO的 企业应用模式(Enterprise Integration Patterns)的实现,你可以采用其 ...

  4. Android 自动换行流式布局的RadioGroup

    效果图 用法 使用FlowRadioGroup代替RadioGroup 代码 import android.content.Context; import android.util.Attribute ...

  5. jquery放大镜

    效果体验:http://runjs.cn/detail/dvygyp5t demo下载 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra ...

  6. FOJ 1608 Huge Mission 线段树

    每个节点维护一个最小值,更新发现如果大于最小值,直接向下更新.速度还可以.. #include<cstdio> #include<algorithm> #include< ...

  7. mac远程连接 win8

    首先 打开组策略 .windows8 下 按win+R 可以唤出运行,输入[gpedit.msc]按下 回车键 选择[计算机配置]>[管理模板]>[Windows组件]>[远程桌面服 ...

  8. html中a标签中的onclick和href的使用

    1. 链接的 onclick 事件被先执行,其次是 href 属性下的动作(页面跳转,或 javascript 伪链接): 假设链接中同时存在 href 与 onclick,如果想让 href 属性下 ...

  9. Express细节探究(1)——app.use(express.static)

    express相信是很多人用nodejs搭建服务器的首选框架,相关教程有很多,也教会了大家来如何使用.如果你想更深的了解他的细节,不妨和我一起来研究一下. 先来看一个每个人都用到的方法app.use( ...

  10. 各个版本的spring jar包

    http://repo.spring.io/release/org/springframework/spring/ 里面有各个版本的jar包