Dotcms: how to set different detail page for single structure per host

290 Views Asked by At

It's a question for every DotCms structure, but consider for example the News structure on my DotCms 2.5 installation: the system lets me choose only a single page as "Detail Page".

Since I don't want to create a new structure for every host I'll create, but I want to use the "detail page" mechanism, how can simulate it?

I can't find a way to pass the path to the .html / .vtl template like for example for the login macro (look at $loginFormSourceCode parameter)

Thanks

DotCms structure image

1

There are 1 best solutions below

1
On

Dotcms will forward your URLmap to the uri of the selected detail page on the host which is being viewed. So, for example, you have your news structure mapped to /news/detail.html on a server that runs multiple sites, site1 and site2. When a user views a selected news item, each site will then forward the user to a detail page local to its site.

So site1 will forward news items to:

site1.dotcms.com/news/details.html

And site2 will forward news items to:

site1.dotcms.com/news/details.html

These are different pages on the servers (though they can share the same .vtl or code to display the content).