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

Allow content_fors in cached blocks #3

Open
brenes opened this issue Oct 7, 2014 · 0 comments
Open

Allow content_fors in cached blocks #3

brenes opened this issue Oct 7, 2014 · 0 comments

Comments

@brenes
Copy link
Member

brenes commented Oct 7, 2014

When a block is cached if the view has a content_for that content_for won't be executed once the block is cached.

We may allow some configuration that says "this view must be rendered in this content for". Something like

NoCms::Blocks.block_layouts = {
    'block' => {
      template: 'my_block',
      fields: {
        something: :string,
        another: :string
      },
      content_for: {
         ready_js: 'my_block_ready_js',
         sidebar: 'my_block_sidebar'
      }
  }
}

And the helper would render those views around a content_for.

This is just a first idea, maybe there's a better system.

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

1 participant