cancel
Showing results for 
Search instead for 
Did you mean: 

Hard coded index page name

aussen2
Champ in-the-making
Champ in-the-making
Just saw that the name for the index pages is hard coded in the WQS client api. That should be changed.


/**
* @see org.alfresco.wcm.client.Section#getIndexPage()
*/
@Override
public Asset getIndexPage()
{
    return getAsset("index.html");
}

So any custom setting for the index page name in alfresco-global.properties (see below for example) will work when creating content in share but not when accessing an index page in the WQS web app.


### WCM QS Configuration Properties ###
wcmqs.indexpage=index.shtml
2 REPLIES 2

aussen2
Champ in-the-making
Champ in-the-making
Also in the WQS web app you have this in the GenericTemplateAssetController.java class:


// Redirect /some-url/index.html to /some-url/ to avoid duplicate URLs being flagged by search engines.
// Also Spring Surf resolves index.html requests so DynamicPageViewResolver doesn't get to process them.
if (path.endsWith("/index.html"))         
{
    int lastDelim = path.lastIndexOf('/');
    String uri = context + path.substring(0,lastDelim+1);
    RedirectView redirect = new RedirectView(uri,false,false);
    redirect.setStatusCode(HttpStatus.MOVED_PERMANENTLY);
    return new ModelAndView(redirect);         
}

bremmington
Champ on-the-rise
Champ on-the-rise
I agree that this is a little rough. Out of interest, what is the reason for changing it from index.html in your case? I'll look at improving this for the next release.