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.

Pass Multiple Variables to an Embed?

March 12, 2009 4:57pm

Subscribe [2]
  • #1 / Mar 12, 2009 4:57pm

    PXLated

    1800 posts

    I seem to recall where you could pass multiple variables to an embeded template but there’s no example in the docs and I certainly can’t find a reference. Is it possible? Something like…
    {embed:site/template1 variable1="abc" variable2="xyz"}

    Have tried that and it doesn’t seem to work, nor does using a pipe between the variables so I’m guessing this isn’t a feature.

  • #2 / Mar 12, 2009 5:01pm

    Ingmar

    29245 posts

    Your syntax appears to be slightly off. Try something like this:

    {embed="site/animals" dog_name="Shadow" cat_name="Twister" horse_name="Mr. Ed"}

    This should definitely work.

  • #3 / Mar 12, 2009 5:14pm

    PXLated

    1800 posts

    Syntax = Quotemarks? Thanks Ingmar, thought I had those 😊

  • #4 / Mar 12, 2009 5:17pm

    Ingmar

    29245 posts

    Actually, I think it was the colon if it’s there in your original code, and not just a typo 😊

  • #5 / Mar 12, 2009 5:51pm

    PXLated

    1800 posts

    I really had it hosed here in my example :-(
    Working in the template now - Thanks!!!

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

ExpressionEngine News!

#eecms, #events, #releases