abstract class MainLayout

Included Modules

Direct Known Subclasses

Defined in:

pages/main_layout.cr

Constant Summary

ASSIGNS = [context : HTTP::Server::Context, current_user : User] of Nil

Instance Method Summary

Instance Method Detail

abstract def content #

[View source]
def current_user #

'needs current_user : User' makes it so that the current_user is always required for pages using MainLayout


def page_title #

MainLayout defines a default 'page_title'.

Add a 'page_title' method to your indivual pages to customize each page's title.

Or, if you want to require every page to set a title, change the 'page_title' method in this layout to:

abstract def page_title : String

This will force pages to define their own 'page_title' method.


[View source]
def render #

[View source]