![]() |
|
|
#1
|
|||
|
|||
|
Hi,
For content pages, the title tag in the html head (displayed in the window title, then) is made of the default title defined in the site settings, followed with the title of the story. Fine. However, I would have expected the title of index pages to be similarly made of the default title followed with the definition name, but it's not. Instead, only the default title is used (so all the index pages have the same title). I'm not sure if this is by design, or if it's a bug. Assuming it's not a bug, is there a way to define or override some of the page's attributes from a page template? Maybe something like [#title:sometext] that would lead MonkeyCMS to set the page's title to "sometext" at rendering time, and therefore to use that when it replaces [page_title] in the Header template? Cheers, Philippe |
|
#2
|
|||
|
|||
|
Quote:
|
|
#3
|
|||
|
|||
|
Cool, thank you, Colin!
But before you look into implementing page directives (which would be great for various things), shouldn't the index name be used automatically, in this case? |
|
#4
|
|||
|
|||
|
Quote:
My current thinking is we come up with a series of directives that override the default based on the page passed in. That should be workable so I'll see what I can do. |
|
#5
|
|||
|
|||
|
Quote:
![]() Quote:
|
|
#6
|
|||
|
|||
|
Quote:
There is a new panel in the Skin Manager called 'Page Directives' You supply the page name, the directive name and the value - and they'll override the site-wide values where appropriate. For example you could set up the following: Page Name: Default Directive Name: page_title Directive Value: This is a page directive When the 'Default' page is displayed through the index.php script, the page_title value is overridden with 'This is a page directive'. This works within correctly within the Skin hierarchy ![]() |
|
#7
|
|||
|
|||
|
Is there any way to override the page title for content pages?
|
|
#8
|
|||
|
|||
|
Only using inline PHP in the header at present. I do it on some pages if you need some pointers.
|
|
#9
|
|||
|
|||
|
Hi Colin!
I'd be very interested in seeing what you've been doing with that please! |
|
#10
|
|||
|
|||
|
Quote:
Code:
<title> %% if ($content[content_id]) ** if ($content[definition_id] == 2 || $content[definition_id] == 24) ** $content[page_title] = 'The Music Fix - '.$content[title].': '.$content[index_title].' Album Review';** else if ($content[definition_id] == 4) ** $content[page_title] = 'The Music Fix - '.$content[title].' Live Review';** else if ($content[definition_id] == 1) ** $content[page_title] = 'The Music Fix News - '.$content[title];**** addToOutput($content[page_title]);%% </title> |
![]() |
| Thread Tools | |
| Display Modes | |
|
|