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

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.
One way is to use the method described by Joe, modifying the XML export
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.

Related

How to edit Default.Page.Template Content in DotNetNuke?

How to change home page content in DNN while creating a site itself.
I need to change different page. I created a new page and created Template. And I replaced inside Templates folder named (Default. page. template). But it is not working out. Provide me a better solution.
Probably the easiest way to do this is to create a site using the default template, edit that site to create your own site, and then save that as a site template (suitable named). You can then use that site template to create sites with the page structure that you want.
The default page template (I believe) is used when you create new pages using the the Pages UI. I don't believe that the default page template is used by the default site template.
If you have created a page and would like to apply a specific page template to the new page retroactively. To do this, go to the page that you want to change and append ?ctl=ImportTab to the url. That will bring up a dialog that allows you to change the emplate for a page with lots of options. It

Installed DNN Module - Not showing in dropdown to give link

I had an link in my DNN site Menu - pointing to aspx page of my installed module.
I replaced this link with an external link.
And now i wish to change back to old one - aspx from module. BUT am not getting that listed in the dropdown
How to get that back or I missed anything ? I could found the module still in that EXTENSIONS.
Please suggest
Rigin
I think you may be a little confused,
Modules are placed on pages, (One or mor module generally makes up a page.
Menu links refer to pages,
To add a module to a menu it must be on a page.
Once you have placed you module on a page you can select it from the select a web page drop down
A dnn module got 2 pages a view page and a settings page. So you must be sure that your module start's with the correct page.
So what you want is not possible the way you want it.
Best way for you is to control the page in your module. You can control this with for example a user controls(ascx). See image for a default module view.

Creating an index page automatically

I'd like to have dotnetnuke build an index page based on pages that have a particular tabid. Are there any modules that do this already?
e.g. we create multiple pages under /News and then the index page lists links to all the news articles. Would be handy if we could also enter our own HTML text (maybe on the News article page itself) that is then displayed next to each link on the index page.
Thanks!
By default, there are no 'real' pages in DNN. Everything is served up in the Default.aspx from content that is stored in the database.
What you could do is create a module that populates data based on the TabId or Path. Then, there is a setting in DNN to make a module appear on EVERY page. Since the module is on every page, it could populate its data based on the TabId or the path, or just not show anything if it doesn't match your criteria.
For something like that, I used a module called SQLGridSelectedView from www.tressleworks.ca (I have no affiliation) and I wrote my own SQL to fill in the fields, and I defined a custom layout (instead of the default data grid) so I was able to do something like what you are asking without code.
There is a module from Ventrian called Child Links that does what you are talking about. You can use it to grab title & description from the pages below a relative to a specific page to build out menus etc.
It allows for formatting however you want as well.

Display content from sub pages

I would like to make sub pages under and existing page. Lets say the page is "Success Stories" and under this page the user can enter in other pages and format them any way they want. What I need is a way to make a repeater of all these subpages with stuff like the page title, a little bit of the content, and a button that links to the actual page.
Is this possible out of the box? I am willing to buy a module if it is reasonable;however a Google search returned no results.
Thank you.
The best option I know is Child Links from Ventrian.
You can show all children with title and description & links. (NOTE: description is Page description NOT content from the page.)
what version of dotnetnuke are you using?
Two options:
ONE
There is a copy page function where you can choose what modules and setting to copy to the new page.
Under the pages menu - click copy page
then you can select what page to copy from, and then it will list all modules on that page. You can choose to copy the module with or without content or even reference the module on the source page.
TWO
Other than that you can create a page template that a user can select that is pre-designed by you. Create the base page the way you want it and then click export page under the page / edit page menu depending on your version. A template will be created in your portal template folder that can be used when creating new pages.
If you are looking to automate this process, then you will have to look into a custom module or design a sql script you can run yourself (but this is a lot more maintenance as it can change with every version.)

How to share DotNetNuke content across multiple pages?

I have just created a new DotNetNuke 6 website. The default installation has a social links area which is on each page. Can I change the contents of the social links (e.g set the Facebook href) in one central place or do I have to go to each page and edit the contents in each place?
DotNetNuke has a notion of referencing modules that would come in handy here. Essentially you can drop a new module on the page and configure it as you please, then go to another page and instead of dropping a new module, you select an existing module from another page. Now each of the modules appear to be separate, but are actually just the same module appearing in different places. You can then edit the module and the content will change across pages. *
To answer your question specifically - I don't believe this is how the default content is set up. You would need to go in and delete all of them (save one) and then reference the remaining elsewhere.
A couple of notes:
This behavior isn't absolute across all modules, technically each module gets to decide how it's content is shared across pages. Most modules, and notably the text/html module, work how I described, but some more advanced modules may not.
Additionally, the "copy module" option in the photo above will create a new module based on the original. If you don't have copy module selected, no new module will be created, the existing one will simply be referenced.

Resources