dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
828 stars 464 forks source link

Update references in VTL files when you copy a site #23442

Open swicken-dotcms opened 1 year ago

swicken-dotcms commented 1 year ago

Is your feature request related to a problem? Please describe.

Currently when you copy a site, any references to the VTL files in code are not updated leading to a required manual update process

It would be good to be able to do this automatically

Related ticket: https://dotcms.zendesk.com/agent/tickets/109223

Describe the solution you'd like

When we copy a site we should scan VTL files for any references to the old site and make them references to the new one.

Describe alternatives you've considered

Use the velocity variables in code instead of hard references to sites, so no updates are required when copying a site.

wezell commented 1 year ago

Just to be clear, there are different use cases to consider here. Many clients want to point all VTLs at a global or "template" site and do not want separate VTLs or to update the references. Any fix for this issue would need to be user selectable option.