From c9bdee363274329fc5dc5dee6c85e5b86b1f28f9 Mon Sep 17 00:00:00 2001 From: Roger Rehnelt Date: Sat, 3 Oct 2026 13:33:19 +0200 Subject: Produktseite: nur das Hauptprodukt mit H1 im Modus „neu“ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ähnliche und eingebettete Produkte bekommen eine H2 und keine Brotkrumen. Auf Produktartikeln steht die H1 unter den Brotkrumen in der rechten Spalte. Co-Authored-By: Claude Opus 5.5 --- views/produktseite/produkt.phtml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/views/produktseite/produkt.phtml b/views/produktseite/produkt.phtml index 507f07e..4ce57be 100644 --- a/views/produktseite/produkt.phtml +++ b/views/produktseite/produkt.phtml @@ -19,15 +19,20 @@ $oProduct = $this->view['oProduct']; if (($this->view['data']['product_key']??'') !== '') $oProduct->setProductKey($this->view['data']['product_key']); - // Ähnliche Produkte usw. stehen im Hauptprodukt; nur das Hauptprodukt bekommt die Brotkrumen + // Nur das Hauptprodukt bekommt Brotkrumen und H1; ähnliche und eingebettete Produkte H2 (K67) $bMainProduct = \wpsg\ProductPage::isMain(\wpsg\ProductPage::enter(), (bool)$this->noReleatedProducts); + // titleDisplayed: Die Seite zeigt den Titel. Für ähnliche Produkte gilt er nicht, sie stehen nach dem Hauptprodukt. + $bRelated = (!$bMainProduct && $this->noReleatedProducts && ($_REQUEST['action']??'') !== 'wpsg_productvariants_switch'); + $bTitleByPage = ($this->titleDisplayed && !$bRelated && !($bMainProduct && \wpsg\ProductPage::templateWithoutTitle())); + $nTitleLevel = \wpsg\ProductPage::titleLevel($bMainProduct, (bool)$bTitleByPage); + $nSectionLevel = (($bMainProduct)?2:3); ?>
- + @@ -97,10 +102,10 @@
- titleDisplayed) { ?> -

getProductName(); ?>

+ 0) { ?> + class="wpsg_producttitle">getProductName(); ?>> view['data']['detailname']??'') !== '' && $oProduct->getProductName() !== $this->view['data']['detailname']) { ?> -

view['data']['detailname']); ?>

+

view['data']['detailname']); ?>

@@ -384,7 +389,7 @@ __('Beschreibung', 'wpsg'), 'moreinfos' => __('Zusätzliche Informationen', 'wpsg'), 'moreinfos2' => __('Lieferumfang', 'wpsg')] as $field => $title) { ?> view['data'][$field]??'')) === '') continue; $section_id = 'wpsg-product-'.$field.'-'.$this->getTemplateIndex(); ?>
-

+ id="" class="wpsg-product__section-title">> >view['data'][$field]; ?>
-- cgit v1.2.3