Detail Page Valid
This helper function can be useful to avoid linking to a detail page view which will 404
Written By Luke Wakefield
Last updated 2 days ago
Example
Example{%- function detail_page_valid = "modules/module_357/front_end/functions/v1/detail_page_valid", fc_data: fc_data, full_slug: this.full_slug -%}
Purpose
This function aims to check two things:
Whether a WebApp has a Detail Layout enabled?
Whether a WebApp Layout has a {{this.full_slug}} which fits an expected pattern.
In future, this function should also be able to provide these checks for Module Layouts too.
Currently, the function is experimental and works well as a straight-out-of-the-box solution for Layouts installed, but we do recommend you also carry out a manual check to make sure links to detail pages are working correctly.