Skip to content
Article Product Front Matter Reference
☀️ Light Clean and bright
📜 Sepia Warm and vintage
🌤️ Light Gray Subtle and neutral
🔵 Light Blue Calm and serene
🌙 Dark Easy on the eyes
🌑 Dark Gray Deep and modern
🔷 Dark Blue Professional and sleek
🌿 Forest Calm and natural

Product front matter reference

A product page is a markdown file in Content/Pages/products/. Everything above the --- fence is front matter; everything below is the page body, which renders inside the Details tab under the summary.

Three files read these keys:

FileReads front matter for
shop.php (partial)deciding which view to render
ProductDetail.phpthe single-product page
ProductIndex.phpthe product grid on the index page

Nothing else. If a key isn't listed below, no view reads it.


Minimum viable product

---
title: Database Viewer
product: true
price: 500.00
currency: ZMW
store: modules-apps-store
image: img/database-viewer.png
summary: A professional read-only browser for your SQLite store databases.
payment_methods: [pawapay, bank]
---

That is enough to render a working product page with a Buy button.


Routing — which view you get

KeyTypeWhat it does
productboolForces the detail view. Not needed for files already under products/ — the directory alone is enough. Use it for a product page living somewhere else.
products_dirstringTurns this page into the product index. Set it to the directory to list, normally products. Put it on products/index.md.
store_pageboolRenders the store detail view. Files under stores/ get this automatically.
stores_dirstringTurns this page into the store index.
my_purchasesboolRenders the buyer's purchase list.
shop_dashboardboolRenders the seller sales dashboard.
pawapay_dashboardboolRenders the PawaPay transaction dashboard.

A page with none of these and no products_dir/stores_dir exits the shop module early and never opens a database connection. That early exit is deliberate — don't add shop keys to ordinary docs pages "just in case".

Order of precedence: a product page that also carries products_dir renders as a product, not as the index.


Identity and copy

KeyTypeDefaultWhat it does
titlestringProductThe <h1>, the card title, and the fallback alt text on gallery images.
summarystring—One-line pitch. Shows on the card in the index grid, and as the first paragraph of the Details tab.
descriptionstring—Alias for summary. Use one or the other, not both.
authorstring—Shows the Author tab. Without author and author_bio, the tab is hidden entirely.
author_biostring—Paragraph inside the Author tab.
detailslist—Spec table at the bottom of the Details tab. Rows are `Label\Value`.
specslist—Alias for details.
orderint500Sort weight on the index grid only. Higher numbers come first; ties break alphabetically by title. Not used on the detail page.
details:
  [Format|Digital download, License|Single site, Updates|1 year, Support|Email]

Images

KeyTypeDefaultWhat it does
imagepath—The card cover in the index grid. Also becomes the first slide of the detail gallery.
thumbnailpath—Alias for image.
image_captionstring—Caption for the cover slide. The images: rows carry their own caption after the pipe; image: is a bare path, so this is where its caption goes.
imageslist—Extra gallery slides. Rows are path or `path\Caption`.
gallerylist—Alias for images.
screenshotslist—Alias for images.
showCoverInGallerybooltrueSet false to keep image as the card cover but leave it out of the slides.
gallery_include_coverbooltrueAlias for showCoverInGallery.
image: img/database-viewer.png
image_caption: Two-panel browser — tables left; rows right
images:
  [img/dbv-tables.png|Table list with instant filter,
   img/dbv-rows.png|Full-text search across every column,
   img/dbv-json.png|JSON columns decoded and pretty-printed]

Behaviour worth knowing:

  • Paths run through assetUrl(), so they're relative to your asset root, same as any other image in the docs.
  • Duplicates are removed by path, so listing the cover again in images is harmless.
  • Hard cap of 20 slides. Anything past that is dropped silently.
  • One slide means no arrows, no counter, no thumbnail strip — but clicking it still opens the lightbox.
  • Zero slides means no gallery block at all. The page renders fine.
  • Images use object-fit: contain, so nothing is cropped. Mixed aspect ratios letterbox rather than cut.

Price, tax and discount

KeyTypeDefaultWhat it does
pricenumber0Base price, rounded to 2dp. 0 renders as Free and hides the quantity stepper.
currencystring$Prefixed to every formatted amount. Use the symbol or code you want printed — ZMW, K, $. Nothing converts it.
discountpercent0Percentage off. Accepts 10, 10% or 10 %.
allowDiscountOfpercent—Alias for discount.
discount_ratepercent—Alias for discount.
discountLabelstringDiscountText in the red badge next to the price, e.g. Early Bird Discount.
discount_labelstring—Alias for discountLabel.
showOriginalPricebooltrueWhether the struck-through original price shows next to the discounted one.
taxpercent0Tax rate. Drives the VAT 16% included line under the price. 0 hides the line.
includedTaxpercent—Alias for tax.
tax_ratepercent—Alias for tax.
taxTypestringVATThe label in that line. VAT, GST, Sales tax.
tax_typestring—Alias for taxType.

How the numbers combine: discount comes off first, then tax is calculated on the discounted amount. Quantity multiplies the discounted unit price in the cart panel.

Two honest caveats about tax. The view displays tax as inclusive ("VAT 16% included") but computes it as an add-on, and the computed total is never printed — the price you see is always the discounted price, tax or no tax. The rate and type are posted to the orders endpoint, so what the invoice says is decided server-side, not here. If you need tax to change what the buyer pays, that's a ShopOrderStore question, not a front-matter one.


Store, payment and delivery

KeyTypeWhat it does
storeslugPoints at stores/<slug>.md. Pulls the store name, its page link, and its VAT/registration numbers into the page header and the order payload.
payment_methodslist of idsFilters the site-wide method list down to these.
paymentslist of idsAlias for payment_methods.
downloadpathEnables the green Download button — but only after the buyer has paid. No download key, no button, even for a paid order.

payment_methods filters, it does not define

Methods live in Content/Pages/products/_payments.md, site-wide, as id|label|type|detail rows. A product's payment_methods can only narrow that list. An id that isn't in _payments.md is silently ignored — list only unknown ids and the cart shows "No payment method configured for this product."

Omit the key entirely and the product offers every configured method.

Ids in use: pawapay (hosted checkout, redirects, stays pending until the callback lands), airtel / mtn / zamtel (PIN push, marked paid on API return), plus bank, paypal, cash, free.

The phone-number field appears automatically when the selected method id contains airtel, mtn, zamtel, mobile or momo. There is no key for it.

Store file keys

For reference, stores/<slug>.md supplies:

title, then tax_number (or vat_number / tax_id), and registration_number (or company_registration / reg_number).


KeyTypeWhat it does
relatedlist of slugsUp to 4 products shown at the bottom. Slugs are relative to products/; the .md is optional.

Leave related out and the module auto-fills: up to 4 other products from the same store, in directory order. Set it explicitly when you want control over which ones.

related: [module-uploader, master-dashboard, shop]

Keys with no reader

These appear in existing product files but no shop view reads them:

  • sku — carried as documentation only. If you expect it on an invoice, check what ShopOrderStore does with the order payload; the views don't send it.
  • tax_country — same. taxType is what gets displayed and posted.

Harmless to keep. Just don't expect them to do anything on the page.


Gotchas

Commas break bracketed lists. details, images, related and payment_methods are all split on commas before anything else. A comma inside a caption or a label truncates it at that point. Use an em dash or semicolon:

image_caption: Two-panel browser — tables left; rows right   # good
image_caption: Two-panel browser, tables left, rows right    # truncated

Not every boolean is safe. showCoverInGallery and showOriginalPrice parse false, no, off and 0 correctly. The routing flags — product, store_page, my_purchases, shop_dashboard, pawapay_dashboard — go through a plain cast where the string false is truthy. Don't write product: false expecting it to switch anything off. Delete the key instead.

Path casing matters in production. Local XAMPP is case-insensitive; Hostinger is not. img/DBV-Tables.png in front matter and dbv-tables.png on disk works on your machine and 404s live.

Percentages are lenient, prices are not. 10%, 10 % and 10 all parse to

  1. But price: K500 parses to 0 — the currency goes in currency, never in price.

index. and _ prefixes are skipped. Files whose basename starts with an underscore or with index. never appear in the product grid. That's how _payments.md stays out of the catalogue.