Hi, have a blueprint for a custom page type (a property listing for real estate), and I want to set each of those to be not visible so they do not show up in the navigation menu. I created a custom “Add New Page” blueprint in /user/blueprints/admin/pages:
form:
validation: loose
fields:
section:
type: section
title: Add a Property Listing
title:
type: text
label: Listing Title
validate:
required: true
folder:
type: hidden
default: '@slugify-title'
route:
type: hidden
default: /active-inventory
name:
type: hidden
default: 'listing'
visible:
type: hidden
default: 1
blueprint:
type: blueprint
Note: I’ve tried both 1 and false for the default value of visible
I’ve also modified the listing template so that it add the value to include the override for visible:
title: Listing
'@extends':
type: default
context: blueprints://pages
form:
fields:
tabs:
fields:
content:
title: Listing
fields:
content:
unset@: true
header.address:
type: text
label: Street Address
header.city:
type: text
label: City
header.zip:
type: text
label: Zip Code
header.county:
type: select
label: County
options:
Atlantic: Atlantic
Bergen: Bergen
Burlington: Burlington
Camden: Camden
Cape May: Cape May
Cumberland: Cumberland
Essex: Essex
Gloucester: Gloucester
Hudson: Hudson
Hunterdon: Hunterdon
Mercer: Mercer
Middlesex: Middlesex
Monmouth: Monmouth
Morris: Morris
Ocean: Ocean
Passaic: Passaic
Salem: Salem
Somerset: Somerset
Sussex: Sussex
Union: Union
Warren: Warren
default: Hunterdon
header.pool:
type: toggle
label: Pool
highlight: 1
help: 'Does the property have a pool?'
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
default: 0
header.garage:
type: toggle
label: Garage
highlight: 1
help: 'Does the property have a garage?'
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
default: 0
header.fireplace:
type: toggle
label: Fireplace
highlight: 1
help: 'Does the property have a fireplace?'
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
default: 0
header.warranty:
type: toggle
label: Home Warranty
highlight: 1
help: 'Does the property have a warranty?'
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
default: 0
header.rooms:
type: text
label: Rooms
validate:
type: number
header.bedrooms:
type: text
label: Bedrooms
validate:
type: number
header.bathrooms:
type: text
label: Bathrooms
validate:
type: number
header.lotsize:
type: text
label: Lot Size
validate:
type: number
header.directions:
type: textarea
label: Directions
header.price:
type: text
label: List Price
validate:
type: number
help: 'List price, numbers only, do not add $'
header.taxes:
type: text
label: Taxes
validate:
type: number
help: 'Taxes, numbers only, do not add $'
header.content:
type: textarea
label: Description
header.testfield:
type: textarea
label: test
header.interior:
type: textarea
label: Interior Features
header.exterior:
type: textarea
label: Exterior Features
header.leadimage:
type: pagemediaselect
folder: '@self'
label: Lead Image
preview_images: true
header.media_order:
label: Images
ordering@: 99
advanced:
fields:
overrides:
fields:
header.visible:
default: false
Neither have any effect. New pages that are create default to being visible.
What am I missing?