WebsiteBaker Support (2.8.x) > Droplets & Snippets
One more snippet: Title & Description - for news also
chio:
Jepp - one more:
This snippet is a replacement for almost the complete html-head section:
It creates:
Charset-Tag
Title (on postings: the posting-title)
meta-description (posting: the first ca 140 chars of short-content)
meta-keywords
<meta name="language" content="..."/>
<meta name="generator" content="CMS: WebsiteBaker; w ww.WebsiteBaker.org"/> ;-)
<meta http-equiv="imagetoolbar" content="no"/>
favicon link (WB_URL/favicon.ico - where it should be anyway)
on search-page:
<meta name="robots" content="noindex,nofollow">
It's kind of beta, but I think it works well, "thorn" help me a lot.
call: ...<head>
<?php simplepagehead(); ?>
<link rel="stylesheet" type="text/css" href=".....
for additional parameters check the readme.txt (english).
Argos:
Thanks for this snippet! I found other useful stuff on your website as well.
chio:
Note: The newest version is here from now on:
http://WebsiteBaker.at/wb/module/simple-pagehead.html
freeSbee made some major changes, so the snippet also supports Bakery, GoCart and image Gallery
aldus:
nice - but could you/the coder insert a message/step out line after the
"modul-in-array" question [line 71] instead of going on and getting unuseable results and errors.
--- Code: ---if(array_key_exists($module_name, $module)) {
/** some code **/
} else {
return ("Sorry - this modul [".$modul_name."]is not supported by this function.");
}
--- End code ---
whatever - we are in the need of "error-messages" or warnings like that.
Regards
Aldus
chio:
Thanks for the hint - but there ist no need for a warning.
1.) The snippet tries to get a description from the module.
2.) If step 1 fails and $the_description is _still_ empty -> Get Page Desription.
--- Code: ---if ($the_description == '') {
$the_description = $wb->page_description;
}
--- End code ---
If a module is NOT supported the snippet does the same as the usual head-section would do.
Navigation
[0] Message Index
[#] Next page
Go to full version