简体   繁体   中英

Getting DNN FileID in 2sxc Template from ADAM File Manager

I ahve a 2sxc Content Module in a DNN Page (Tab) that is already configured with one string Field "Titel" and one file field "Datei"

The Template works okay and shows me the text from the Field "Titel" with the Razor Variable @Titel and the Download-Path & Filename with the Variable @Datei

Because I have to perform a custom Functionality I REALLY need to get the FileID (DNN-SQL-File Table) of the selected File instead of the Filename/Path

When selecting the File from the ADAM Filemanager (from the DNN File System /Portals/0/...) it shows the File ID in the Edit Dialog. It also stores the FileID in the Database (ToSIC_EAV_Values) as "file:12345" for the Attribute "Datei"

How can I accomplish to get the FileID of the File instead of the FileURL for using this in my Template eg

The FileID is: @Datei.FileId

I already spent hours on searching for a solution but was not able to find a Solution ... I tried different forms of FileID, fileID, fileId, FileId ...

I am sure this must be a simple thing but I was not able to accomplish this

Thanks in advance and kind regards Don

You might try the approach shown here: Retrieve FileID from DotNetNuke using FileName

The file field in your 2sxc content entity returns the path to the file, and it's name. So, work from there?

Retrieve FileID from DotNetNuke using FileName provides some details on why much of this is hidden in 2sxc.

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