index

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Tag feature.Tag = "njn-blocks-index"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block interface {
	feature.EnjinBlock
}

type CBlock

type CBlock struct {
	feature.CEnjinBlock
}

func (*CBlock) Init

func (f *CBlock) Init(this interface{})

func (*CBlock) Make

func (f *CBlock) Make() Block

func (*CBlock) NjnBlockType

func (f *CBlock) NjnBlockType() (name string)

func (*CBlock) NjnClass

func (f *CBlock) NjnClass() (tagClass feature.NjnClass)

func (*CBlock) PrepareBlock

func (f *CBlock) PrepareBlock(re feature.EnjinRenderer, blockType string, data map[string]interface{}) (block map[string]interface{}, redirect string, err error)

func (*CBlock) ProcessBlock

func (f *CBlock) ProcessBlock(re feature.EnjinRenderer, blockType string, data map[string]interface{}) (html template.HTML, redirect string, err error)

func (*CBlock) RenderPreparedBlock

func (f *CBlock) RenderPreparedBlock(re feature.EnjinRenderer, block map[string]interface{}) (html template.HTML, err error)

type Filter

type Filter struct {
	Key     string `json:"key"`
	Label   string `json:"label"`
	Query   string `json:"query"`
	Present bool
	Url     string

	Group    int
	Position int
}

func (Filter) Copy

func (f Filter) Copy() (duplicate Filter)

type Filters

type Filters [][]Filter

func (Filters) Copy

func (f Filters) Copy() (duplicate Filters)

func (Filters) FilterPages

func (f Filters) FilterPages(pages []feature.Page) (filtered []feature.Page)

func (Filters) Find

func (f Filters) Find(key string) (filter Filter, ok bool)

func (Filters) SetPresent

func (f Filters) SetPresent(key string) (updated bool)

func (Filters) Update

func (f Filters) Update(filter Filter) (updated bool)

func (Filters) UpdateUrls

func (f Filters) UpdateUrls(tag, reqArgvPath string, argv ...string)

type MakeBlock

type MakeBlock interface {
	Make() Block
}

func New

func New() (field MakeBlock)

type View

type View struct {
	Index int
	Key   string
	Url   string
	Label string

	Present bool

	Filters    Filters
	HasFilters bool

	Paginate string
	NextMore string

	FirstPage string
	PrevPage  string
	NextPage  string
	LastPage  string

	PageIndex  int
	PageNumber int
	TotalPages int
	NumPerPage int

	SearchAction string
}

func (*View) GroupHasFilterPresent

func (v *View) GroupHasFilterPresent(idx int) (has bool)

func (*View) HasFilterPresent

func (v *View) HasFilterPresent() (has bool)

type Views

type Views []*View

func (Views) HasFilterPresent

func (v Views) HasFilterPresent() (has bool)

func (Views) HasFilters

func (v Views) HasFilters() (has bool)

Jump to

Keyboard shortcuts

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