display

package
v0.0.0-...-ce71dfa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2012 License: BSD-2-Clause-Views Imports: 20 Imported by: 0

README

Display

The biggest gotcha regarding this module is the way the template files are read: the module tries to load every file first from the /template, then if it can not be found, from /modules.

Examples:
":module/:action" => /template/:module/:action.tpl, /modules/:module/tpl/:action.tpl
"skeleton/GetSingle" => /template/skeleton/GetSingle.tpl, /modules/skeleton/tpl/GetSingle.tpl

If multiple files are specified:

// ...
err := display.New(ctx).Do([]string{"articles/GetSingle", "skeleton/GetSingle"})
// ...

The first found will be executed, so put the more specific ones first.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Display

type Display struct {
	// contains filtered or unexported fields
}

func New

func New(ctx iface.Context) *Display

func (*Display) Do

func (d *Display) Do(files []string) error

func (*Display) Error

func (d *Display) Error(err error) error

This is called if an error occured in a front hook.

func (*Display) ToString

func (d *Display) ToString(files []string) (string, error)

type Form

type Form struct {
	*lang.Form
}

func (*Form) HiddenFields

func (f *Form) HiddenFields() [][2]string

func (*Form) HiddenString

func (f *Form) HiddenString() template.HTML

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL