Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > How do I set the title of the root to be equal to page title prefix? View modes: 
User avatar
Member
Member
michiel - 6/23/2010 9:59:51 AM
   
How do I set the title of the root to be equal to page title prefix?
I have been experimenting with the settings [Page title format] and [Page title prefix]. Basically what I want is the following:

1: The homepage should be the root node (/)
2: For the homepage the title should be ONLY {%prefix%}
3: For any other node display {%pagetitle_orelse_name%} - {%prefix%}

Because it's apparently impossible to set the document name for the root node it node will have this title when viewed in the browser with the above settings for [Page title format]:

- Prefix

That's a space followed by a dash followed by a space and THEN the prefix. Is there any effective way to control this? With ASPX templates it was easy to program. But with Portal mode I can't find out how to have this simple requirement.

Thanks!

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2010 3:03:33 AM
   
RE:How do I set the title of the root to be equal to page title prefix?
Hi,

Which version do you use?

I am able to set (v5.5) the default alias path setting to "/" this displays just the root page by default and in this case only the prefix is displayed in the browser title frame. When I navigate to any other page, its title is displayed together with the prefix (as it is set in the settings).

Could you pelase check if the settings are inherited by the particular web site (if you are setting them on global level).

Best regards,
Juraj Ondrus

User avatar
Member
Member
michiel - 6/24/2010 3:41:48 AM
   
RE:How do I set the title of the root to be equal to page title prefix?
Hi, thanks for the reply.

I have now set [Default alias path] manually to "/" for the site, and the title is still " - Prefix" so that does not work. Do I need any other setting?

Why would I need to set [Default alias path] to "/", doesn't a site in Kentico always display the root node by default?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2010 6:54:11 AM
   
RE:How do I set the title of the root to be equal to page title prefix?
Hi,

What are your exact settings - the exact values in those fields? Isn't it possible that the dash is added there?

Default alias path setting tell which page should be loaded into the master page by default. Master page is usually a kind of envelope, so this setting will ensure that inside this envelope is loaded desired page.

Best regards,
Juraj Ondrus

User avatar
Member
Member
michiel - 6/24/2010 7:02:47 AM
   
RE:How do I set the title of the root to be equal to page title prefix?
Ok, I understand, but if I set it to "/" it shouldn't make a difference. Because it should load the root node anyway, right?

Here are the settings:

Global
Default alias path: empty
Page title format: {%prefix%} - {%pagetitle_orelse_name%}
Page title prefix: empty

Site
Default alias path: /
Page title format: {%pagetitle_orelse_name%} - {%prefix%}
Page title prefix: Test

The result when browsing to http://localhost/ is that the title of the page is " - Test"

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/29/2010 12:39:56 PM
   
RE:How do I set the title of the root to be equal to page title prefix?
Hi,

that is correct - there is no page title since the path is "/" and by default, there is nothing set for the page title on the root document.

So, the {%pagetitle_orelse_name%} is resolved as empty string and since there is a dash sign and page title prefix set, this is resolved to " - Test".

Or, am I missing somthing here?

Best regards,
Juraj Ondrus

User avatar
Member
Member
michiel - 7/5/2010 4:35:44 AM
   
RE:How do I set the title of the root to be equal to page title prefix?
Well, it's in the title of the thread:

"How do I set the title of the root to be equal to page title prefix?"

So in other words, in this scenario, which I presume to be common (the root node is the homepage), how can the title of the page be "Test" and not " - Test"

Is that possible at all in Kentico 5.5 using the Portal development model?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/7/2010 7:57:08 AM
   
RE:How do I set the title of the root to be equal to page title prefix?
Hi again,

Yes, it is possible. You can use custom macro in the page title fields and settings, so you can resolve it to your value as you need to for every page.

Best regards,
Juraj Ondrus

User avatar
Member
Member
michiel - 7/8/2010 9:32:33 AM
   
RE:How do I set the title of the root to be equal to page title prefix?
Ok, so only with a custom macro as I understand it.

Thanks for your help!