Skip to content

Developer notes

  • Theme directory: design/themes/kv_folio (child of responsive), delivered by the add-on kv_theme_folio. The add-on copies var/themes_repository/kv_folio into design/themes on install; never edit the copy in var/themes_repository.
  • Styles: styles/data/<Style>.less (Theme editor variables + @kv_* kit tokens + @fo_* Folio tokens: shelf @fo_shelf / @fo_shelf_hi and mode @fo_shelf_mode (ledge, line, stitch), section head mode @fo_head_mode (rule, mark, stitch) and highlighter @fo_hl, ribbon @fo_rib, catalogue card paper @fo_card with its rules and red top rule, office band colours, spine colours @fo_sp1..8), the skin in css/skin/skin.less. Own CSS classes use the fo- prefix; .fo-sp1..8 set the spine colours (--fo-sp, --fo-spi).
  • Templates added by the theme (all render the stock output, or nothing, without the licensed design):
    • blocks/products/kv_fo_shelf.tpl, kv_fo_chart.tpl, kv_fo_botm.tpl, blocks/categories/kv_fo_spines.tpl
    • blocks/static_templates/kv_fo_ask.tpl (Ask the catalogue), kv_fo_office.tpl (office band), kv_fo_formatbar.tpl (format bar + author header)
    • addons/banners/blocks/kv_fo_hero.tpl, addons/banners/blocks/kv_fo_promos.tpl, addons/blog/blocks/kv_fo_posts.tpl
    • blocks/vendor_list_templates/kv_fo_sellers.tpl, blocks/wrappers/kv_fo_shop.tpl
    • hook files of the add-on: product grid card (products:product_multicolumns_list override with the card partial addons/kv_theme_folio/partials/kv_fo_card.tpl), product page (products:main_info_title pre and post, products:product_detail_bottom pre with the catalogue card, the reorder line and the delivery rows, products:product_tabs post with More by this author), the scope select (search:additional_fields post), reader reviews (discussion:items_list_row override for the block with the user class fo-revs-block), index:html_tag pre, index:scripts pre.
  • Data: app/addons/kv_theme_folio/func.php (“folio-data”): $product.fo from gather_additional_products_data_post (author + list URL, series + number + URL, publisher, formats, genres, age, ISBN, pages, published, pack, staff pick note and signature, signed, book flag, New, Coming soon); the search extension in additional_fields_in_search (request parameter fo_scope); $fo from dispatch_before_display (format variants with counts and filtered links, Ask the catalogue hints, the format bar and the author header of the current list built from the request URL, the quick order pad URL, JSON for theme.js, product page: more by this author); seller facts from get_companies_post / get_company_data_post. Catalogue data is cached in the Registry with the feature, filter, product and category tables as cache tags. Every handler returns at once unless the storefront runs the licensed design. Catalogue data only: safe with the block cache and the full page cache.
  • Script: js/addons/kv_theme_folio/theme.js on the Kavio kit API (Tygh.kvTheme): Look inside, the mega menu Formats column, hero slider, scope placeholders, SKU copy, bottom bar, option buttons.
  • Features are found by code (FO_*) or by name; see Usage.
  • The theme never overrides core templates; your own hooks keep working.