简体   繁体   中英

dnn - 2sxc - modules of a duplicated page / page template are using the same content

I created a page within dnn (v9.0.2, 2sxc 8.12.0) with all modules (only 2sxc content modules) like the page design had defined it. After this I created a template from this page. After this I created a couple of sites using this template.

My problem is, if I change the content of module A on page 1 - all modules A on the other pages 2..n of this template have this content now too. Same effect, if I use the duplicate functionality.

Does anyone have a hint how to use page temlating using 2sxc content modules?

What you need to do is open the template file in an editor and locate the section that describes the module. The best way to do this is to find the EntityId of the content item on the page from which you created the template. Then, find that number string in the template. Just remove the string, leaving the XML node otherwise intact.

When you build the page, you'll get a 2sxc module that is uninitialized and you'll need to specify the content.


If anyone is listening, I wish that this behavior was different. I'd prefer that the template assigned to the module could be preserved, but with the default content showing.

Basically the issue is that DNN has only one way to export a page, and we would need something where our code could contribute something before the export is complete.

At the moment there are two ways to do this.

  1. One way is to use the method described by Joe, modifying the XML export
  2. The other way is to place un-initialized blocks on the template page - meaning that you select your content-type / template, or your app, but don't start adding any content yet. This should result in the identical XML as the one modified manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM