Page Title
Page Title
Is there any way to make the Page Title say something different than the menu listing? {PAGETITLE}
I think I have to create seperate page layouts for every page on my website so that I can customize each of the Page Titles.
Is there an easier way to do this?
Thanks in Advance
I think I have to create seperate page layouts for every page on my website so that I can customize each of the Page Titles.
Is there an easier way to do this?
Thanks in Advance
Re: Page Title
helloseo-105 wrote:Is there any way to make the Page Title say something different than the menu listing? {PAGETITLE}
I think I have to create seperate page layouts for every page on my website so that I can customize each of the Page Titles.
Is there an easier way to do this?
Thanks in Advance
did you try it via css!?
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Hi Oliver
I am a little confused why page title does not show up when accessing categories directly from menu:
Settings:
Layout: page title - set to blank (with the hope that category will propagate)
add to title: category(checked) article name (checked)
OK when viewing inidvidual articles themselves - category and article name show up in the <title> tags.
However....
when accessing the category directly from menu...showing article listing for that given category....the title is blank. The only way to get an appropriate page title for the category is to insert literal page title in layout for that page...requires 'multiple layouts' to send page title parameters. I must be missing something....no?
What would be ideal would be to minimize layouts, using them across categories.....adding 'acat_name' to page title by default.
jsw
Settings:
Layout: page title - set to blank (with the hope that category will propagate)
add to title: category(checked) article name (checked)
OK when viewing inidvidual articles themselves - category and article name show up in the <title> tags.
However....
when accessing the category directly from menu...showing article listing for that given category....the title is blank. The only way to get an appropriate page title for the category is to insert literal page title in layout for that page...requires 'multiple layouts' to send page title parameters. I must be missing something....no?
What would be ideal would be to minimize layouts, using them across categories.....adding 'acat_name' to page title by default.
jsw
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
use this if you want to get back the category name all the time and anywhere.
Oliver
Code: Select all
{PHPVAR:$GLOBALS['content']['struct'][$GLOBALS['content']['cat_id']]['acat_name']}
It is always great to get a reply from the master, but unfortuantely this apprentice is still unable to get the code properly implemented. Since the expression is enclosed in {curly braces}, I assume it is to be placed within wcms..as an expression to be evaluated. Unfortunately no luck in placing it either in (1) pagetitle field in backend layout or (2) as an expression for header in backend templates, as in.....
I am guessing I am not approaching it the right way....obviously you have something more sophisticated in mind. Forgive my being the simpleton. I have to believe there is a way to get page title for a categories displaying multiple articles.....It (TITLE) displays correctly for categories with a single article, but when there are multiple articles in a given category (TITLE) does not show up in title bar. This is what I have narrowed it down to so far.
cheers,
jsw
I am guessing I am not approaching it the right way....obviously you have something more sophisticated in mind. Forgive my being the simpleton. I have to believe there is a way to get page title for a categories displaying multiple articles.....It (TITLE) displays correctly for categories with a single article, but when there are multiple articles in a given category (TITLE) does not show up in title bar. This is what I have narrowed it down to so far.
cheers,
jsw
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
OK, now I have understand...
in "content.func.inc.php" change around line 185 to the following code:
Oliver
in "content.func.inc.php" change around line 185 to the following code:
Code: Select all
// generating the complete article
if($aktion[4]==1 && $aktion[1]) {
include_once(PHPWCMS_ROOT."/include/inc_front/content.article.inc.php");
} else {
if($pagelayout["layout_title_cat"] && $content['struct'][$content['cat_id']]['acat_name']) {
if($content["pagetitle"]) $content["pagetitle"] .= " | ";
$content["pagetitle"] .= $content['struct'][$content['cat_id']]['acat_name'];
}
}