WebsiteBaker Support (2.13.x) > Modules
Put news title in template
misterdj:
Sorry, I don't understand it correctly, my English is not that good. Are there any examples of how I can adjust this or a hint where I can look? Thanks in advance
sternchen8875:
:oops: i've to say sorry and go a step back :oops:
i was very sure, that it works for me in some projects and so i write my answer, but i didn't see, that i use the simplepagehead-Module for that. this is very easy to use and upgrade-safe
another solution needs some changes in the view.php of the used modules and will lost in the next upgrade, so, not the best solution
to simplepagehead
its a old, but very good working module from Chio, a former member here with a lot of good modules and templates. This module replace some informations in the head-area of the page-output. It reads for some special defined modules the detail-informations from the database, in the news-module the title of a news, the short-content, the keywords from the news-overview-page and the description of this page
With these informations, the module replace the globale page description from the wb-options with the page description from the news-overview, also the keywords (if defined) and the title
the simplepagehead-module has pre-defined definitions for news-module, bakery (shop), (image)gallery, gocart (simple shop) and topics. its possible, to add more modules or remove unneeded things like gocart etc
Step 1 - install the module from the attachement
Step 2 - index.php of the used frontend-template
standardcode in the index.php of the template without simplepagehead
--- Quote ---<head>
<meta name="robots" content="index,follow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php page_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
--- End quote ---
change to
--- Quote ---<head>
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php if(function_exists('simplepagehead')) {
simplepagehead();
} else { ?>
<title><?php page_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>">
<meta name="description" content="<?php page_description(); ?>">
<meta name="keywords" content="<?php page_keywords(); ?>">
<?php
}
--- End quote ---
Step 3 - check the output in the source-code, especially the head-area. be sure, that you've no double entries
if you need help, ask for it
P.S.: the module works for me in different wb-versions from WB 2.10 up to the latest 2.13.5 R223
sternchen8875:
--- Quote from: misterdj on April 04, 2024, 11:49:33 AM ---Sorry, I don't understand it correctly, my English is not that good. Are there any examples of how I can adjust this or a hint where I can look? Thanks in advance
--- End quote ---
no problem - write in your own language, if its better for you :wink:
there are enough translation-apps, so it doesn't matter
misterdj:
Yeah its works!!! Thanks alot
:-)
sternchen8875:
(Y) (Y)
Navigation
[0] Message Index
[*] Previous page
Go to full version