Page Link from other hosts

11 views
Skip to first unread message

aDNers

unread,
Jan 9, 2018, 10:52:04 AM1/9/18
to dotCMS User Group
Hello,

I have this scenario:

3 hosts:
resources

Site1 and Site2 share the same Content Type. When adding a Detail Page to the Content Type I would like to choose a Page which exists on //resources. 

I am able to browse to all available hosts and pick a detail page - but the path used seems to be saved as a local path - not the full path to the chosen host. Instead of getting the expected path: //resources/pages/my-detail I only get /pages/my-detail (which I see when clicking the info-button next to the browse-button on the properties of a content type.) Now I have to choose a detail page which path exists on both Site1 and Site2 (the pages however, shares the same vtl from //resources).

(Please let me know If I should clarify more, not sure I managed to explain my problem in an understandable way...)

BR
Anders

Chris Falzone

unread,
Jan 9, 2018, 3:36:38 PM1/9/18
to dot...@googlegroups.com
Yeah, you need to have the Page Content exist on both hosts, it can't use a shared host for the detail page.  It will work if the pages are in the same path though, but the page has to exist on both hosts.  The page can parse a VTL from the shared host so you don't have to replicate the code.  

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/6127b7c0-0f4e-4843-8732-a57751ff6121%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anders Linder

unread,
Jan 10, 2018, 3:18:42 AM1/10/18
to dot...@googlegroups.com
Chris, 

alright, thanks for the answer. 

Our site currently exists in 7 different country versions/languages (one language per host) and they all share the same content types and pages (although the content may be unique per host). So for this specific usecase it would have been neat to have all shared building stones in one place (including pages) - but as you suggest, having the pages on all hosts does the trick.

BR
Anders


2018-01-09 21:36 GMT+01:00 'Chris Falzone' via dotCMS User Group <dot...@googlegroups.com>:
Yeah, you need to have the Page Content exist on both hosts, it can't use a shared host for the detail page.  It will work if the pages are in the same path though, but the page has to exist on both hosts.  The page can parse a VTL from the shared host so you don't have to replicate the code.  

On Tue, Jan 9, 2018 at 10:52 AM aDNers <and...@smartson.se> wrote:
Hello,

I have this scenario:

3 hosts:
resources

Site1 and Site2 share the same Content Type. When adding a Detail Page to the Content Type I would like to choose a Page which exists on //resources. 

I am able to browse to all available hosts and pick a detail page - but the path used seems to be saved as a local path - not the full path to the chosen host. Instead of getting the expected path: //resources/pages/my-detail I only get /pages/my-detail (which I see when clicking the info-button next to the browse-button on the properties of a content type.) Now I have to choose a detail page which path exists on both Site1 and Site2 (the pages however, shares the same vtl from //resources).

(Please let me know If I should clarify more, not sure I managed to explain my problem in an understandable way...)

BR
Anders

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.

To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/6127b7c0-0f4e-4843-8732-a57751ff6121%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dotcms/-TzAVllko10/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+unsubscribe@googlegroups.com.

To post to this group, send email to dot...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Anders Linder
Technical Operations Manager
and...@smartson.se | 070‑7586008
Smartson AB Industrig. 4A, 11246 Stockholm
Web: smartson.se | Kontor: 08‑54520160

John Michael Thomas

unread,
Jan 10, 2018, 10:13:35 AM1/10/18
to dotCMS User Group
As Chris said, the most straight-forward way to do this is:

  1. Create a separate detail page on each site.
    • Make sure they all have the same file name and the same path.
  2. Create a VTL file with the shared code on the shared host.
  3. Include the shared VTL on each of the detail pages.

In your case, this sounds like it might work well, since the detail page on each site can use the appropriate template (and thus appropriately translated header, footer, navigation, etc.) for the site it's on.  If you want all of the detail pages to look exactly the same (with same text in header, footer, and other page elements) on different sites, then you have to do some additional work to create a template that looks the same on each site.

Anders Linder

unread,
Jan 11, 2018, 1:14:32 AM1/11/18
to dot...@googlegroups.com
Thanks John,

I have implemented your suggested approach, and it works for our usecase.

BR
Anders

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dotcms/-TzAVllko10/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages