feat(solutions): build 5-page Solutions section
Implements the 5 Solutions pages (1 hub + 4 tier detail) with full EN copy
from PDF Strategie & Contenu D.2-D.6.
Architecture
- inc/solutions-data.php: single PHP array keyed by slug, holds the 4 tiers
(my-proserve, proserve-flex, proserve-academy, customization). Each tier
declares its hero, sections, and optional upsell. Section schema supports
4 types: prose / cards / list / cta.
- template-parts/solution-detail.php: reusable partial that iterates the
sections of a tier and renders each per its type. Alternates light/dark
backgrounds for visual rhythm.
- templates/page-solution-detail.php: WP custom Page Template
("Template Name: Solution Detail"). Looks up the current page slug,
pulls the matching tier from solutions-data.php, and hands off to the
partial. Falls back gracefully if the slug is unknown.
- templates/page-solutions-overview.php: WP custom Page Template
("Template Name: Solutions Overview") for /solutions/. Renders the
3-tier comparison table + PROSERVE+ teaser.
Pages were seeded into the DB by a one-shot mu-plugin
(wp-content/mu-plugins/asterion-seed-solutions.php in LocalWP) that
created the parent /solutions/ page and 4 children with the right
post_parent + _wp_page_template, then self-deleted.
Verified all 5 URLs return HTTP 200:
/solutions/ 62 KB
/solutions/my-proserve/ 65 KB
/solutions/proserve-flex/ 65 KB
/solutions/proserve-academy/ 63 KB
/solutions/customization/ 62 KB
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Solution Detail
|
||||
*
|
||||
* Custom page template assigned to /solutions/my-proserve/, /solutions/proserve-flex/,
|
||||
* /solutions/proserve-academy/ and /solutions/customization/.
|
||||
*
|
||||
* Looks up the page slug in inc/solutions-data.php, hands the matched array off
|
||||
* to template-parts/solution-detail.php, and renders the result wrapped in the
|
||||
* standard header + footer.
|
||||
*
|
||||
* @package AsterionBricks
|
||||
*/
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$slug = get_post_field('post_name', get_queried_object_id());
|
||||
$data = include AV_THEME_DIR . '/inc/solutions-data.php';
|
||||
|
||||
if (! isset($data[$slug])) {
|
||||
// Fallback : fall back to the basic page rendering if the slug isn't mapped.
|
||||
get_header();
|
||||
echo '<section class="av-section"><div class="av-container">';
|
||||
echo '<h1>' . esc_html(get_the_title()) . '</h1>';
|
||||
echo '<p>' . esc_html__('Solution data not found for slug:', 'asterion-bricks') . ' ' . esc_html($slug) . '</p>';
|
||||
echo '</div></section>';
|
||||
get_footer();
|
||||
return;
|
||||
}
|
||||
|
||||
get_header();
|
||||
set_query_var('av_solution', $data[$slug]);
|
||||
get_template_part('template-parts/solution-detail');
|
||||
get_footer();
|
||||
Reference in New Issue
Block a user