We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New layout methods: {layout:append}, {layout:prepend}, {layout:set_pair}, {layout:append_pair}, {layout:prepend_pair}, {layout:pair}

Feature Requests

TJ Draper's avatar
TJ Draper
222 posts
9 years ago
TJ Draper's avatar TJ Draper

So as the title would indicate, I would love to see an expansion on the layout concepts. Right now I’m in a situation where appending to a layout variable would be fantastic. Here are some things I would love to see.

{layout:append name="my_var"}
    my data
{/layout:append}

{layout:prepend name="my_var"}
    more data
{/layout:prepend}

{layout:set_pair name="my_pair"}
    {layout:my_var}stuff{/layout:my_var}
{/layout:set_pair}

{layout:append_pair name="my_pair"}
    {layout:my_var}stuff{/layout:my_var}
{/layout:append_pair}

{layout:prepend_pair name="my_pair"}
    {layout:my_var}stuff{/layout:my_var}
{/layout:prepend_pair}

And then to get the pairs:

{layout:pair name="my_pair"}
    {if layout:count == 1}<div class="foo">{/if}
        {layout:my_var}
    {if layout:count == layout:total_results}</div>{/if}
{/layout:pair}
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.