Learn More





DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

Introducing ADAM 1.2 with Folders, Metadata and C# API

The newest version of ADAM (Automatic Digital Assets Manager) lets you group files (often images) into folder (like albums) and also lets you add custom metadata like author, title, description and much more. Adding assets to a content-item just got 10x more powerful.

Content Management Needs Assets

So there are many cases where content-managers need to add a series of files to a single content-item. Common examples are:

  1. Products with a library of packshots
  2. Customer showcase with a bunch of screeshots
  3. Extranet with product catalog and media libraries for images, documents etc.
  4. Image galleries (with lots of images, possibly structured as folders)
  5. People profiles with a variable number of additional documents (like CVs, etc.)
  6. Catalog of real-estate with 1 library of inside-photos, 1 library of photos of the surroundings and another library of documents

There are two basic things that make this difficult. On one hand it's the undefined amount of assets (requiring a 1-item-to-X-assets data-model) and it's the maybe-needs-grouping (where editors expect a folder, not a group-dropdown-field). 

The data model for a programmer is fairly straightforward, and all the solutions are setup +/- the same way. BUT it's complicated, and from my experience web-designers find it hard to model this - both from the data side as well as the templating. 

...and it needs Metadata

What adds problems is that each asset quickly needs additional information. Often the designer/developer will assume that the file-name will suffice, till an additional requirement appears like: "the real-estate photo should show the author, the gps-coordinates and have a description with keywords for google". So basically each asset needs 1-100 more fields to fill in - and this too causes many issues. 

 And the metadata should probably be multi-language, and typed, ...

Now Fully Automated in ADAM 1.2

So ADAM 1.2 - part of 2sxc 8.1 - now includes all this. It took us about a week to develop, and now it has

  1. A new field-type called library - which is a field which allows you to add unlimited files. So a content-item can have one or more of these, allowing you to have a Product content-item with a Photos library and a Manuals library and another Applications library showing customers using the product.
  2. Each library can also have folders and sub-folders (configurable). This allows you to require that the Applications library is grouped into Albums (folders) while the Manuals are not. 
  3. You can create another content-type - like ManualDescription - which you can then tell ADAM to use as file-metadata. ADAM will then let the editor tag each file with this information.
  4. You can create even another content-type - like Application Group Metadata - which you can use as folder-metadata. This allows the editor to tag each folder with additional information.
  5. The Razor Engine has a new API so that you can use AsAdam to access / loop through these assets and the asset metadata.

To demonstrate all this I created a demo-app called Tutorial ADAM. The following screenshots are from that app so and will help you get started.

The Content-Editor Experience

Basically the content-editor needs almost zero training, because as with everything in 2sxc, it's just there, and it just works. This shows a content-entry dialog of a simple record containing an assets field:

As you can see, the screenshots are fairly intutive, and folders / new-folder and files appear directly. Note that most file-types have an own icon (like ZIPs, PDFs, etc.). Upload is drag-and drop. 

Metadata is handled with the blue / grey tag. Note that these would not be available if the web-designer didn't configure metadata. As you can see the tooltip would even tell you which content-item describes this asset:

Editing metadata is simply done by clicking on the tag:

So again very trivial and barely needs training. And yes, the metadata supports every possible feature in 2sxc - including WYSIWYG. It could even contain another library of assets. 

The Data-Modeling Experience

Adding such a library field is also very, very easy. Basically you'll add a File / Hyperlink field and choose the type Library - like this:

To configure Metadata - if you even need it - first create the content-types (in this example they are called Group Details and Screenshot Details:

Then you'll have to tell the Screenshots-field to use these metadata-types. This is done in the field-configuration of Screenshots:

Again - straight forward, easy to do. After this the content-editor already has the UX described above. 

The Coder / API User Experience

We're really keen on providing solutions, not just tools. Because of this we spent many hours figuring out how the code should be and trying various API. The following example shows a C# loop showing the screenshots:

As you can see line 9 contains the foreach-loop and line 11 creates the thumbnail with a title showing the name. Line 14 shows you the WYSIWYG-description retrieved from the Metadata. 

The API is very smart, so that it won't cause errors if the metadate is missing :)

And one more thing: the new code-editor (in 2sxc 8.1) automatically gives you ADAM snippets for all library-fields. This should really make it easy to get things going:

Export / Import Works Too

Another days work was invested to ensure export/import works, because many things like folders can have metadata, but were never included in the export. This too was ensured. 

Note that an App containing ADAM will now include all ADAM assets - and because of that it can easily be 10mb or even 50mb. Be aware of this when you re-import it somewhere, because you often have web.config settings limiting the upload size. 

Try it yourself!

You will need the newest 2sxc (at least 8.01.00) and the demo app

Love from Switzerland,

Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 800 DNN projects since 1999. He is also chief architect of 2sxc (see forge), an open source module for creating attractive content and DNN Apps.

Read more posts by Daniel Mettler


There are currently no comments, be the first to post one.

Comment Form

Only registered users may post comments.


2sic Daniel Mettler (125)
Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (22)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (203)
Chris Paterra (55)
Clinton Patterson (28)
Cuong Dang (21)
Daniel Bartholomew (2)
Dave Buckner (2)
David Poindexter (3)
David Rodriguez (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (270)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (52)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (37)
Will Strohl (163)
William Severance (5)
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?