forked from kabukky/journey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
requestdata.go
23 lines (20 loc) · 933 Bytes
/
requestdata.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// +build !noplugins
package structure
import (
"github.com/yuin/gopher-lua"
)
// RequestData: used for template/helper execution. Contains data specific to the incoming request.
type RequestData struct {
PluginVMs map[string]*lua.LState
Posts []Post
Blog *Blog
CurrentTag *Tag
CurrentIndexPage int
CurrentPostIndex int
CurrentTagIndex int
CurrentNavigationIndex int
CurrentHelperContext int // 0 = index, 1 = post, 2 = tag, 3 = author, 4 = navigation - used by block helpers
CurrentTemplate int // 0 = index, 1 = post, 2 = tag, 3 = author - never changes during execution. Used by funcs like body_classFunc etc to output the correct class
ContentForHelpers []Helper // contentFor helpers that are attached to the currently rendering helper
CurrentPath string // path of the the url of this request
}