Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Catalog = ridu.Collection{ Slug: "products", Fields: field.Fields{ field.Text("name").Required(), Tags, field.NumberList("availableSizes"). Min(0).Max(50). MaxRows(20), }, }
View Source
var Products = core.Collection{ Slug: "products", Fields: field.Fields{ field.Text("title").Required(), SellingPoints("sellingPoints").Label("Selling points"), Sizes("availableSizes").Default(8, 10, 12), SellingPoints("translatedPoints").Localized().DefaultFrom( func(ctx operation.Context) (operation.Value[[]string], error) { if ctx.Locale == "fr" { return operation.Present([]string{"Fabriqué à la main"}), nil } return operation.Present([]string{"Hand finished"}), nil }), Package("package"), }, }
View Source
var Tags = field.TextList("tags"). MinLength(1).MaxLength(30). MaxRows(8) // Allow up to eight tags.
View Source
var UniqueTags = Tags.Validate(noRepeatedTags)
Functions ¶
func CompactPackage ¶
func CompactPackage(name string) (field.GroupField, error)
func FindTaggedProducts ¶
func Package ¶
func Package(name string) field.GroupField
func SellingPoints ¶
func SellingPoints(name string) field.TextListField
func Sizes ¶
func Sizes(name string) field.NumberListField
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.