WebsiteBaker Community Forum
WebsiteBaker Support (2.12.x) => General Help & Support => Topic started by: RonR on June 21, 2019, 10:49:26 AM
-
Using 2.12.1 and add-on like SocialBaker among others.
Question is how to add recipe structured data markup to some pages, not all.
The socialBaker markup is working (perfectly!) for all pages.
How can I make a markup in the <head> section that can be written on a per-page-basis. Is there an add-on that does that?
Hope to learn from you!
-
1.)
Settings > Advanced Options > Server Settings > Section-Anchor text:
Sec none
2.)
info.php =
$block[1] = 'MainContent';
$block[2] = 'HeaderContent';
3.)
Template =
<?php page_content(2); ?>
</head>
Wysiwyg or Code-Modul
Code =
?>
wat you want
:-D
Reg./MfG. Evaki
ps. If you operate with Code you need Code-Modul with Patch
https://forum.WebsiteBaker.org/index.php/topic,31485.msg220249.html#msg220249
-
Good way from evaki.
A other way could be:
- index.php of the template
- between <head> and </head> something like this
<?php if (PAGE_ID == 1) { ?>
your HTML Code here ...
<?php } ?>
1 = the page id of your wished page. page id's are displayed on the right side in page overview in backend.
-
Ahh, got it. Thank you for your help.
Small question:
at 1. the section-anchor text now says: wb_
I can delete that safely and leave it blank?
I will get the patched code module, thanks!
Ron
-
@dbs: also possible, but for 25 recipes a bit of long code. But thanks for you input.
I prefer evaki's solution that can also be edited in the admin.
-
@dbs
Kann leider nur kurz, deshalb deutsch.
Explizit Text = none - nicht leer/blanc
Es kann nun mit Code auf jeder Seite indiviuell xyz eingefügt werden, ist also seitenorientiert
-
What the artist try to say: you need really the word "none". Not nothing. :)
-
<internal>
Code ist in der aktuellen Version mit dem kleinen Patch für fast alles gut :-D 8-)
Unter anderem auch um das an anderer Stelle erwähnte XML zu parsen.
Fehlt nur noch'n xml-Editor - da bin ich selbst "auf der Lauer".
Ich selbst hatte nämlich "früher" z.B. immer Probleme beim Erstellen von Playlists. Grauselig, das nicht im WB machen zu können. Aber so langsam geht's in die von uns - und auch mir - gewünschte Richtung.
Eigentlich wollten wir des öfteren nur Schnittstellen zu anderen Anwendungen.
Mit php ab v5.xx und mittlerweile v7.xx läßt sich da 'ne Menge mehr machen, eben speziell mit diesem Code-Modul.
</internal>
MfG. Evaki
-
@internal: not tested yet codeX.
But a suggestion for later versions. buttons:
- save
- save & back