Page 1 of 1

Page Title

Posted: Sat 19. Jun 2004, 00:29
by seo-105
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

Re: Page Title

Posted: Sat 19. Jun 2004, 00:33
by Pappnase
seo-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
hello

did you try it via css!?

Posted: Sat 19. Jun 2004, 00:43
by seo-105
That might work! Thanks Pap!

Posted: Sat 19. Jun 2004, 15:57
by Oliver Georgi
Don't mix page title, article title and structure level.

Oliver

Hi Oliver

Posted: Wed 7. Jul 2004, 00:11
by jsw_nz
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

Posted: Tue 13. Jul 2004, 03:14
by jsw_nz
I tested this on Pappnase's test site and the same problem occurs. apart from making separate layout entries, is there any other workaround?

Posted: Tue 13. Jul 2004, 07:43
by Oliver Georgi
use this if you want to get back the category name all the time and anywhere.

Code: Select all

{PHPVAR:$GLOBALS['content']['struct'][$GLOBALS['content']['cat_id']]['acat_name']}
Oliver

Posted: Tue 13. Jul 2004, 10:44
by jsw_nz
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

Posted: Tue 13. Jul 2004, 11:04
by Oliver Georgi
OK, now I have understand...

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'];
	}
}
Oliver

Posted: Tue 13. Jul 2004, 15:24
by jsw_nz
Brilliant

thanks very much - jsw