Hi there,
I would like to know has anybody being able to do this.
Each page has its own meta keywords and title.
I have searched lot of information about it but no luck.
any help or pointer with this would be greatly appreciated.
Manoj
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Meta keywords and title different for all the pages...
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Dec 22, 2002
- Posts: 117
I found the title part in header.php:
global $info, $hometext;
echo "\n";
if (pnConfigGetVar('dyn_keywords') == 1) {
$htmlless = check_html($info['maintext'], $strip ='nohtml');
$symbolLess = trim(ereg_replace('("|\?|!|:|\.|\(|\)|;|\\\\)+', ' ', $htmlless));
$keywords = ereg_replace('( |'.CHR(10).'|'.CHR(13).')+', ',', $symbolLess);
$metatags = ereg_replace(",+", ",",$keywords);
echo "\n";
} else {
echo "\n";
}
} else {
/**
* all other page output
*/
echo '\n";
echo '\n";
and changed this part:
echo '\n";
to
echo '\n";
I also had to change global $info, $hometext; to global $info, $hometext, $extratitle;
Then I went into each page that I wanted to have a different title first and added:
$extratitle="New Title";
The value has to be assigned before the header function is called and if the value isn't assigned, like say you left it out on a certain page, it doesn't do anything since the value is empty so it didn't hurt any to put it there.
You can also set up a MySQL Database query to get a title out of the database but that's kind of useless as there aren't that many pages that are going to need this since the articles page has the unique titles for each article using the article title.
Are you wanting to change the title that appears on the article page? -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Nov 30, 2002
- Posts: 5
hi reallynicejerk,
thanks indeed for your nice suggestion. I got your concept of putting $title. But how do i put it on pages and modules.
I want the Title o the article to be title of the page. I believe its difficult to do bcos headers are written before the page and content is even drawn.
so what do u think is solution or workaround for this.
Manoj -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Dec 22, 2002
- Posts: 117
what version postnuke are you running?
On all the versions that I've seen the title of the article is the title on the page when you read the article... however I haven't seen very many different versions.
as for putting it into a module try going to the module's different pages and setting the variable the way I showed:
$extratitle='Your extra title here in between the apostrophes, don\'t forget backslashes for apostrophes and to use '.$this.' setup for '.$variables.' because PHP won\'t search for '.$variables.' when they are within apostrophes (which makes apostrophes faster to parse than quotation marks).';
or reallistically:
$extratitle='Welcome to my website!';
anyway you can also put them in the modules.php file like this:
if ($op=="modload"){
if($name=="Members_List"){
$extratitle='Welcome to my member\'s list page!';
}
if($name=="My_custom_modulet"){
$extratitle='This page is a custom module that I created myself!!!';
}
}
and so on
- Moderated by:
- Support
