Forums / Setup & design / [solved] Site title missing on certain pages

[solved] Site title missing on certain pages

Author Message

Nathan Kelly

Sunday 13 November 2005 9:34:22 pm

Hi all, more problems with things going missing when browsing the site, this time it's the site title thats missing.

I'm using the standard page_head.tpl, as soon as I go to an url such as "user/edit" or "content/edit" or even "content/advancedsearch" the title is missing (except for the name of the top node) but here on ez.no this is not the case.

This is the code, I imagine this is the same code that ez.no uses, I've done nothing to change it?

{let name=Path
     path=$module_result.path
     reverse_path=array()}
  {section show=is_set($module_result.title_path)}
    {set path=$module_result.title_path}
  {/section}
  {section loop=$:path}
    {set reverse_path=$:reverse_path|array_prepend($:item)}
  {/section}

{set-block scope=root variable=site_title}
{section loop=$Path:reverse_path}{$:item.text|wash}{delimiter} / {/delimiter}{/section} - {$site.title|wash}
{/set-block}

{/let}

    <title>{$site_title}</title>

I have tried fetching the $module_result.path into the pages in question but it seems to be unable to find the path, is this normal behaviour?

Please help if you know what may cause this... Deadline approaching rapidly.

Cheers!

Pardon me while I burst into flames...

Nathan Kelly

Tuesday 15 November 2005 2:27:43 pm

Hi all, I've lost two days on this problem now, has anybody got any idea why the site title might be missing from the pages mentioned above?

Or more to the point how I can add a site title to these pages?

As I said the $module_result.path seems to be the culprit but I don't know why it will not work I haven't done anything that should effect it.

Please please help, any ideas welcome...

Cheers!

Pardon me while I burst into flames...

Bruce Morrison

Tuesday 15 November 2005 9:06:17 pm

Hi Nathan

I suspect that this is the same issue as with the navigation on these pages - variables that you are relying on simply do not exist or have a different form when in these modes.

What you are tring to do does appear to work in the standard admin templates while editing.

Look at how it's done in design/standard/templates/page_head.tpl

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Nathan Kelly

Tuesday 15 November 2005 9:17:02 pm

Thanks Bruce, I agree this is similar to my previous problem.

The template you mention "design/standard/templates/page_head.tpl" is the template I am currently using, even if I let ez fall back to that exact template the problem persists.

Is there perhaps an .ini setting I may have overlooked?

Cheers!

Pardon me while I burst into flames...

Bruce Morrison

Tuesday 15 November 2005 10:56:38 pm

Hi Nathan

What does adding {$module_result.title_path|attribute(show,3)} to the pagelayout give you when you are on these pages?

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Nathan Kelly

Wednesday 16 November 2005 3:10:17 pm

Hi Bruce thanks for your suggestion, I tried {$module_result.title_path|attribute(show,3)} in the page layout and I found that on my "content" pages the output was something like this (depending on the depth of the node)

Attribute 	Type 		Value
0 		array 		Array(4)
>text 		string 		'Site name'
>url 		string 		'/content/view/full/2'
>url_alias 	string 		''
>node_id 	string 		2
1 		array 		Array(4)
>text 		string 		'Folder name'
>url 		string 		'/content/view/full/77'
>url_alias 	string 		'folder_name'
>node_id 	string 		77
2 		array 		Array(3)
>text 		string 		'Page name'
>url 		boolean 	false
>url_alias 	boolean 	false

But on pages such as "content/advancedsearch", "content/edit" etc. there is no output.

I tried the same thing with {$module_result.path|attribute(show,3)} and on the "content/advancedsearch" and "content/edit" etc. and I got this output (depending on the page, this is the search page).

Attribute 	Type 		Value
0 		array 		Array(2)
>text 		string 		'Search'
>url 		boolean 	false
1 		array 		Array(2)
>text 		string 		'Advanced'
>url 		boolean 	false

Any ideas? Should I try replacing the title_path in page head?

Cheers!

Pardon me while I burst into flames...

Gurudutt Verma

Thursday 17 November 2005 2:05:41 am

Hi!

Could you show me the template code showing the title ?

for e.g. page_head.tpl

Nathan Kelly

Thursday 17 November 2005 2:40:49 pm

Hi Gurudutt, I think I have found the problem, the custom page_head.tpl I was using had a couple of slight changes that have affected the output (not sure why).

However I have switched my template with the original and the title is working correctly now.

In the custom template I tried to change the reverse path, I'm not used to reverse paths on the site title so I attempted to un-reverse it, it seems this is what caused the problem.

So now I know I can't un-reverse the path I can live with that, I wouldn't have thought this would cause a problem because it worked on most of the pages, just not the pages like "content/edit" etc.

Sorry for the trouble, this was really bugging me but thankyou all for your patience.

Cheers!

Pardon me while I burst into flames...