2

I just started using Low Variables. I just bought Mustash to use with Stash. It is unclear to me as a newbie certain functionality and what best practices are. Which type of snippets would go in LV and which snippets in Stash

2 Answers 2

13

Stash and Low Variables are complementary.

Low Variables

Essentially a replacement for native snippets and global variables. Provides a control panel interface for managing variables. Variables may be considered content - text values, matrix data, default images - or code, such as a tag that outputs your primary navigation or contains your footer markup.

Variables groups can be used to allow some variables to be managed by your client (e.g. the content type variables) and others to be managed by you, the developer (e.g. the code variables).

Stash

The most basic use of Stash is to save the output of tags - or the tags themselves - at runtime (when a template is parsed). You can then re-use the fragment of saved data somewhere else in your template(s).

Stash can be used to change the parse order of your tags such that fragments of data can be passed from tag to tag in the order you desire.

Stash embeds can be used as a powerful replacement for ExpressionEngine embeds.

Stash caching can be used to save your fragments of data to the database. The tags that generated the data then do not need to run again, so subsequent views of your template use less resources.

Stash can be used to implement various advanced template design patterns:

Mustash

Mustash allows you to manage cached Stash variables in the control panel and set up cache-breaking rules such that the cache is refreshed when content is edited in the control panel. You can choose which sections of Mustash will be accessible to you or your clients; for example, you may wish for your client to be able to clear the cache but not have access to the rules section.

You do not need Mustash in order to use Stash, but if your are using caching then it will make things much easier to manage for both you and your client.

1
  • 1
    Thank you so much for this elegant explanation and for your brilliant work with Stash and Mustash. DC Aug 15, 2013 at 16:00
1

I think you misunderstood. Stash is a sort of replacement functionality for EE's built in snippets (yes oversimplifying it a bit, but that's what it boils down to), as in that it's meant for developers, where Low Variables is a way for clients to manage "global content" (such as settings, contact information etc). They work perfectly fine together.

1
  • Thank you but I'm still really unclear. What FUNCTIONS does Stash do that LV can't do - [apart from the user being a developer] Aug 15, 2013 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.