Suppress index page name from the page title

I want to be able to suppress the name of my index page from the page title.


Rather than have a page title of Home - Dept of Nutrition… I want to just have Dept of Nutrition…



Going by the example for hiding a heading using a design customisation, I thought I could do something similar for the page title in the header.



<title>

<MySource_AREA id_name="page_title" design_area="menu_normal" print="yes">

<MySource_PRINT var="asset_name" />,

</MySource_AREA>

<MySource_PRINT var="site_name" />, New Zealand

</title>



When I do this, I just get ", Site Name, New Zealand" as a title. It's giving me the comma after the asset name but not the asset name itself. This is happening before I apply the design customisation to hide the asset name on the main index page. It is the same syntax I used except the title tag is outside the area and of course, I changed area name.


First, you're using a menu_normal design area which will always add bunch of initialization code into your parsefile, which you don't need. I recommend using an asset_lineage design area instead, because it adds no code unless it finds a <mysource_asset> tag.

Second, because you're inside a design area, you need to tell Matrix to use the global print system, not the one for the design area itself, by adding id_name="__global__" to each <mysource_print> tag:

    
    
    ,
    
    , New Zealand
    

[quote]First, you're using a menu_normal design area which will always add bunch of initialization code into your parsefile, which you don't need. I recommend using an asset_lineage design area instead, because it adds no code unless it finds a <mysource_asset> tag.


Second, because you're inside a design area, you need to tell Matrix to use the global print system, not the one for the design area itself, by adding id_name="global" to each <mysource_print> tag:


    
    
    ,
    
    , New Zealand
    
[/quote]

Works a treat. Thanks.

I guess the __global__ bit is needed if you have a print tag inside a mysource_area tag. I never needed out when I didn't have the mysource_area tag.

Yup. Good rule of thumb to include it wherever its applicable so that future changes (like this) don't break it.