ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Any way to define dynamic variable in templates ?

December 06, 2011 2:51am

Subscribe [2]
  • #1 / Dec 06, 2011 2:51am

    Studio Meta

    105 posts

    Hello,

    Right now we’re working on some exciting new project with EE, which need many custom tweaks.

    While optimizing page load, I asked myself if there was any way to define some dynamic variable in templates.

    For example, in the header I could use the exp:channel:entries, retrieve {title} and save it in a new variable like {channel_name_title}.

    Then in the footer, I could use again this {channel_name_title} variable without the need to make additionnal SQL queries using another exp:channel:entries parsing.

    Anyone ?

  • #2 / Dec 07, 2011 12:55am

    Dan Decker

    7338 posts

    Hi Studio Meta,

    The add-on Stash was created for just this sort of thing.

    Thanks!

  • #3 / Dec 07, 2011 3:11am

    Studio Meta

    105 posts

    Great ! Many thanks 😊

  • #4 / Dec 08, 2011 3:17pm

    Dan Decker

    7338 posts

    Hi Studio Meta,

    Glad we could help! If you need anything else, just let us know in a new thread.

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases