[MODx] 6. Cache '! ' with the login package

Source: Internet
Author: User
Tags modx

1. Install Login Package.

2. Create a Template called ' login ':

[[!     Login? &loginresourceid= ' + '//means after login, redirect resource page, in our case, redirect to Self]]<H2>Register</H2> [[!    Register? &submitvar= ' registerbtn '&activationresourceid= ' a '&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. '] <Divclass= "Register">    <Divclass= "Registermessage">[[!+reg.error.message]]</Div>     <formclass= "form"Action= "[[[~[[*id] ]]"Method= "POST">        <inputtype= "hidden"name= "Nospam"value= "[[!+reg.nospam]]" />         <label for= "username">[[%register.username?&namespace= ' Login '&topic= ' Register '] <spanclass= "Error">[[!+reg.error.username]]</span>        </label>        <inputtype= "text"name= "username"ID= "username"value= "[[!+reg.username]]" />         <label for= "Password">[[%register.password]]<spanclass= "Error">[[!+reg.error.password]]</span>        </label>        <inputtype= "Password"name= "Password"ID= "Password"value= "[[!+reg.password]]" />         <label for= "Password_confirm">[[%register.password_confirm]]<spanclass= "Error">[[!+reg.error.password_confirm]]</span>        </label>        <inputtype= "Password"name= "Password_confirm"ID= "Password_confirm"value= "[[!+reg.password_confirm]]" />         <label for= "FullName">[[%register.fullname]]<spanclass= "Error">[[!+reg.error.fullname]]</span>        </label>        <inputtype= "text"name= "FullName"ID= "FullName"value= "[[!+reg.fullname]]" />         <label for= "Email">[[%register.email]]<spanclass= "Error">[[!+reg.error.email]]</span>        </label>        <inputtype= "text"name= "Email"ID= "Email"value= "[[!+reg.email]]" />         <BRclass= "Clear" />         <Divclass= "Form-buttons">            <inputtype= "Submit"name= "Registerbtn"value= "Register" />        </Div>    </form></Div>[[! Profile]]<P>Username: [[+username]]</P><P>Email: [[+email]]</P>

In the bottom, we call the The [[! Profile]] Snippet without cache. So every time, we logout, and the profile would be is clear up.

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

Caching

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

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

[MODx] 6. Cache '! ' with the login package

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.