Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using variables within callbacks arguments #10

Closed
kureuil opened this issue Feb 25, 2013 · 7 comments
Closed

Using variables within callbacks arguments #10

kureuil opened this issue Feb 25, 2013 · 7 comments

Comments

@kureuil
Copy link

kureuil commented Feb 25, 2013

Currently it's impossible to use a variable inside a callback argument. I know it's a lightweight templating engine but could we have the ability to do something like that:

{{ foo:bar arg="herp/{baz}" }}

Or at least something similar.

(Link: https://forum.pyrocms.com/discussion/23562/using-variable-in-fileslisting-does-not-work)

@kureuil
Copy link
Author

kureuil commented Mar 20, 2013

Nevermind, I just found a workaround in pyro's documentation.

@kureuil kureuil closed this as completed Mar 20, 2013
@amityweb
Copy link

Dont know how you did it by good collegue here stated you must use double brackets like so, which works for me in the files:listing tag:

{{ foo:bar arg="herp/[[baz]]" }}

@RyanThompson
Copy link
Member

Single curlies I believe: {inner_tag}

Sent from my iPhone 5

On Jun 27, 2013, at 5:18 AM, Laurence Cope notifications@github.com wrote:

Dont know how you did it by good collegue here stated you must use double brackets like so, which works for me in the files:listing tag:

{{ foo:bar arg="herp/[[baz]]" }}


Reply to this email directly or view it on GitHub.

@amityweb
Copy link

No, single curlies do not work in this situation, see https://forum.pyrocms.com/discussion/23562/using-variable-in-fileslisting-does-not-work, thats why I asked!

@kureuil
Copy link
Author

kureuil commented Jun 27, 2013

Yup, the "best" practice I've found is actually to use the double brackets as your collegue told you. Eventually, you can switch to a plugin if you need more flexibility but in most cases double brackets should be enough.
Sorry to not have told you @amityweb I've totally forget :(

@amityweb
Copy link

Double brackets stopped working for me now I upgraded from 2.2.0 to 2.2.1

@amityweb
Copy link

Actually have to use page: before my custom variable so wiorks now, have updated the forum https://forum.pyrocms.com/discussion/23562/using-variable-in-fileslisting-does-not-work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants