dev_willis
dev_willis

Reputation: 580

How do I use inline templates in MODx Revo?

I'm using the Login snippet in MODx Revo and I'm trying to put the template directly in the loginTpl and logoutTpl properties but nothing is being output. Below is my code. What am I doing wrong? Thanks in advance!

[[!Login? &tplType=`inline` &loginTpl=`<span>Log In</span>` &logoutTpl=`<span>[[+username]]</span>`]]

Upvotes: 0

Views: 502

Answers (2)

Alexandr
Alexandr

Reputation: 11

The placeholders are evaluated before snippet is processed, i.e. before the @INLINE tpl is ever used.

Use chunks; Or non-cacheable placeholder (has not been tested):

[[!Login? &tplType=`inline` &loginTpl=`<span>Log In</span>` &logoutTpl=`<span>[[!+username]]</span>`]]

Upvotes: 1

Vasis
Vasis

Reputation: 2281

It fully works, check to see if login component is installed (it is not installed by default).

Upvotes: 0

Related Questions