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

Default values for list items #105

Open
timkelty opened this issue Apr 1, 2014 · 4 comments
Open

Default values for list items #105

timkelty opened this issue Apr 1, 2014 · 4 comments

Comments

@timkelty
Copy link
Contributor

timkelty commented Apr 1, 2014

This would be ideal:

{exp:stash:set_list name="foo"}
{stash:some_value trim="yes" default="1"}{cf_foo}{/stash:some_value}
{/exp:stash:set_list}
@croxton
Copy link
Owner

croxton commented Apr 2, 2014

I like it, but it can be expensive to parse variable pairs with parameters like that. With hundreds of rows that might become a problem. How about:

{exp:stash:set_list name="foo" some_value:default="1" some_value:trim="yes"}
    {stash:some_value}{cf_foo}{/stash:some_value}
{/exp:stash:set_list}

@croxton
Copy link
Owner

croxton commented Apr 2, 2014

The advantage being those parameters are parsed for 'free' by EE (without extra overhead).

@GDmac
Copy link
Contributor

GDmac commented Apr 2, 2014

👍

@timkelty
Copy link
Contributor Author

timkelty commented Apr 2, 2014

Good by me!

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

No branches or pull requests

3 participants