Skip to content

Render Content without a Layout #73

@whitehat101

Description

@whitehat101

My stasis project uses a common layout for almost all pages. My deliverable is a HTML fragment that a user would paste into a larger CMS. My rails-inspired assumption was that layout false in a before block would render the code without the layout, but this errors.

I want to preview/test my code in the "actual" layout, and have stasis generate a downloadable fragment side-by-side.

My solution was to create a simple haml layout:

= yield

I set the layout to that file for that controller. Could layout false have the same effect as my blank layout?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions