Portal Engine
Version 3.x > Portal Engine > I want a cms editable data file View modes: 
User avatar
Member
Member
polarwarp-gmail - 1/27/2009 11:14:41 PM
   
I want a cms editable data file
In a .NET application - I would put an xml data file in the ~/App_Data/Files directory - and refer to that in the web config file as the file location. In my code behind - I would then refer to my config value to read a file. However how does this translate to the Portal Engine?

I want the cms User to be able to maintain this XML file - and I want my code to read this xml file - but I don't know how to refer to the location of this file.

I added a folder and file to my application within the CMS desk.
eg: Data/Videos.xml

But referring to it as ~/Data/VideoFeeds.xml is looking in the wrong folder. I'm not even sure if this file is physically stored or whether its somehow stored in the database??

Can someone explain how to do what I'm trying to achieve.

Thanks!

User avatar
Member
Member
kentico_pavelk - 1/28/2009 10:07:27 AM
   
RE:I want a cms editable data file
Hello,

Could you please provide me with more details? If you want users to be able to edit the xml file, you can create custom table in the database which will contain the content of the xml file. Then you can use your own query to get this data.

Best Regards,
Pavel Knotek

User avatar
Member
Member
polarwarp-gmail - 1/28/2009 5:57:17 PM
   
RE:I want a cms editable data file
Hi,

I was trying to reuse an existing user control that is built to read an xml file - so I was trying to avoid having to recode it - I will have a look into the database stuff.

However I still don't get how to refer to a file in the site.

eg. I have added a file under the following structure (through the Portal Engine)
Files/Video/filename.swf

The source of the page is looking for the file here:
http://localhost:2212/KenticoCMS/Files/Video/filename.swf

and not finding it. I have something in my code that looks at the application url (which the url suggests is http://localhost:2212/KenticoCMS) and uses that to build up each files location.

Thanks.


User avatar
Member
Member
polarwarp-gmail - 1/28/2009 6:25:20 PM
   
RE:I want a cms editable data file
The above is based on me running it through Visual Studio so I can debug the code.. I also tried it without the ports.. to see if I could figure out how to reference the various files.

I noticed is that for each flash file - I have a thumbnail image with the same name (but different extension). The only way I could find to view the thumbnail:

http://localhost/Files/Video/3-careers-team-p1.aspx

But I have code looking for a jpg (for the thumbnail) and and flv file for the flash. I would prefer not to have to go and rename every image - can I not use normal file extensions to refer to images and flash?? Have I missed something in adding these files to the site?

User avatar
Member
Member
polarwarp-gmail - 1/30/2009 12:18:30 AM
   
RE:I want a cms editable data file
Ok - so in a nutshell:

I have a web user control that I'm using for a video gallery. It currently uses an xml file to refer to the flash files. I want this xml file and all the flash files to be content managed.

The files sit under:

Files/Video/blah.swf
Files/Video/flv/blah.flv

and the xml file refers to the blah.swf file.

When I upload a file - everything seems to be given an aspx extension - even if I use the alias property.

- How can I make these files content manageable to an ordinary user (not developer)?
- The swf files are obviously looking for the flv files in a subdirectory - so I need to ensure that the system can still find them in the same way.
- How do I reference the path of these files from the xml file - as currently they don't appear to be working?


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/4/2009 3:57:22 AM
   
RE:I want a cms editable data file
Hi,

You need to create custom web part or control, which will allow the user to edit the XML file in CMS Desk and then store the data. The same also for ensuring the paths and so - you need to develop custom logic for this. If you will know where the files will be stored, you can create the path to them.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
triathlondan - 9/22/2010 3:19:21 AM
   
RE:I want a cms editable data file
I have a similar issue in that I'm attempting to create an XML document that the user can maintain through the cmsdesk by editing fixed fields. Does this require the building a custom web part or is there something built in I can use? It would appear easy enough as I could create a template and use web parts to build the structure of the XML and editable areas but I can't drop the template out of inheriting the html, head, body etc.

Thanks
Dan

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/23/2010 3:09:49 AM
   
RE:I want a cms editable data file
Hi,

Regrettably there are no news in this way. You need to develop custom web part to achieve this need.

I am sorry for the inconvenience.

Best regards,
Juraj Ondrus