2sxc

Is there a way to Clone one or many Entities (records) in Code

不羁的心 提交于 2021-02-11 13:12:36
问题 NOTE: at this time I am stuck on 2sxc v9.43.2 on this project. After selecting a set of records from my Content Type, I need to be able to duplicate them changing 1 of the fields along the way. Here is my almost-working idea so far. The use case is simple, they have Programs that people can register for. They change each Season, but only a little (prices, dates/times, etc). And they need the Current Season live and unchanged while they edit the Next Season. So we are still in the fall season

Is there a way to Clone one or many Entities (records) in Code

五迷三道 提交于 2021-02-11 13:12:06
问题 NOTE: at this time I am stuck on 2sxc v9.43.2 on this project. After selecting a set of records from my Content Type, I need to be able to duplicate them changing 1 of the fields along the way. Here is my almost-working idea so far. The use case is simple, they have Programs that people can register for. They change each Season, but only a little (prices, dates/times, etc). And they need the Current Season live and unchanged while they edit the Next Season. So we are still in the fall season

2SXC Import Content Items - Hyperlink File Libraries

不想你离开。 提交于 2021-01-29 09:45:02
问题 I've looked through the database best as I can, but I can't find a way to import files in a Hyperlink-Library for each content item. I see that 2sxc uses DNN's Filed and Folders table, but I cant see how the 2sxc content type's field links to the folder and the files. Basically, I have about 400+ content items to import and about 6000+ linked files that need to be imported. I figure it probably isn't possible to import the files directly from the XML file, but is it possible to write an sql

How can I add a value to Fields of Type Entity when using App.Data.Create()

最后都变了- 提交于 2021-01-29 06:06:10
问题 When I am in external code and trying to add an entry to an existing Content Type, how can add one or more values to a field of type Entity? So lets use the FAQ v3 app as an example, here is the code with the add Categories line commented out: int appId = 4; // FAQ3 for me var appX = ToSic.Sxc.Dnn.Factory.App(appId); var fields = new Dictionary<string, object>(); fields.Add("InternalTitle", askQ.Name + ", " + askQ.Email); fields.Add("Question", askQ.Question); // fields.Add("Categories", "");

How to force two instance of the same app (DNN/2sxc) to read from the same stream?

China☆狼群 提交于 2021-01-29 05:55:33
问题 Sorry if my question is silly but I'm new to DNN/2sxc, I've spent the whole day trying to figure this with no success.. I have two instances of the same app, one in the home page and the other on its own page, each one must have its own view template (I use Razor). My problem is I cannot figure a way to make the two apps read the same data, so every add/edit/remove/re-sort in one of them will be reflected to the other, currently each app has its own data and therefore they are unusable in my

How to force two instance of the same app (DNN/2sxc) to read from the same stream?

走远了吗. 提交于 2021-01-29 05:54:17
问题 Sorry if my question is silly but I'm new to DNN/2sxc, I've spent the whole day trying to figure this with no success.. I have two instances of the same app, one in the home page and the other on its own page, each one must have its own view template (I use Razor). My problem is I cannot figure a way to make the two apps read the same data, so every add/edit/remove/re-sort in one of them will be reflected to the other, currently each app has its own data and therefore they are unusable in my

How to fix 'Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0' Error with 2sxc in DNN

微笑、不失礼 提交于 2020-01-30 08:46:59
问题 I have a local DNN site and I am trying to use the 2sxc module to create content/apps before placing it on the actual production site. I tried to install the Razor Tutorial App and when I place it on the page I am given following output: Error: System.IO.FileLoadException: Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly

Sort 2sxc adam files

℡╲_俬逩灬. 提交于 2020-01-16 07:49:09
问题 I can get images that way: foreach (var pic in AsAdam(Content, "Images").Files) 1.What is the right way to sort images by name or upload date? 2.How to custom reorder images? 回答1: The "folder" itself doesn't provide ordering. I have two suggestions Either do something where the files have a leading number - which is not shown in the output. This is what I do on the app-catalog so each file has a "31 output editing" - with this I can pre-sort them in my local system before batch uploading them

2sxc: Dropdown list Get Label instead of value in razor template

若如初见. 提交于 2020-01-06 17:09:11
问题 I have a dropdown in my contents like this https://snag.gy/OxgeoA.jpg where I have got 3 "labels:value" options. In my razor template I would like to get the label instead of the value. With this I only get the value (for example 0,1,2) @Content.Name How can I get Labels please? (for example Negativo,Positivo,Non Testato of my screens). Thanks you EDIT: I found a temp solution making a new entity, but I don't know if it is the right way because I thought that with a dropdown content field

Not able to delete 2sxc view

北城以北 提交于 2020-01-05 06:37:13
问题 I'm not able to delete a 2sxc view. getting a warning "Had an erro talking to the server (status 400). Massage:Bad Request Detail:found 2 relationship where this child - the parents are:3854 (2sexyContent-ContentGroup), 3897 (2sexyContent-ContentGroup)." Please find warning image attached. 回答1: This means the template is still in use. You can either find out where exactly, delete the module and the dnn-trash, then you can delete. Alternately you can force-delete it (not recommended). To Force