What is it?
A listing of the documents, files, images or whatever other assets you choose to display for the current page.
Assets used: Asset Listing, Design, Design Customisation
How do I do it?
Configure the Asset Listing
- Make an Asset Listing and give it an appropriate name
- Acquire the locks and select the asset types you would like to list, for this example we will use PDF File and MS Word Document
- Select Live from the Asset Statuses to List section
- Select the Root Node from Asset Locations. As we are creating a dynamic listing you need to select the tree area where the listing will be used, it should be set as high as possible so at the site level is perfect. (TIP: You can set multiple root nodes and use this listing across several sites, as we are replacing the node it is listing from it will never show content across sites)
- Set Direct Links Only to Yes forcing the listing to only look under the current asset being viewed
- Move down to the Customise No Results Bodycopy and set this to No, there is no need to tell your readers that there are no documents for this page
- Change the Dynamic Parameter to Replacement Root node for the listing (must be a child of the static root node) and set Source to Current Asset
- Commit the changes
Create a space in your Design File
- Navigate to your Design, right click on it and go to Edit Parse File (TIP: Whenever you edit your parse file it's a good idea to take a copy in case any changes you make turn up some unexpected surprises.)
- In the appropriate area of your design add in a nest content area
<MySource_AREA id_name="file_listing" design_area="nest_content" print="no">
<MySource_SET name="type_codes" value="page" />
- Commit the Parse file
- Right click on the Parse file and select Customisations
- Acquire the locks
- Tick the box to create a new customisation and give it an appropriate name then commit it
- Click on the link to go to the newly create Design Customisation
- Find the design area for file_listing that you just created and tick the Customise box next to it and click commit
- The design area should now move to the Customised area. Now click on the link to select it.
- Acquire the lock if required and set Print to Yes.
- Under the Link area change the Nested Asset to the Asset Listing you created in the steps above
All that's left to do is to apply the design customisation to the appropriate pages in your site.
Once everything is working you can go back to the Asset Listing and edit the type formats for the different formats you selected so they display differently in the listing. It's a good idea to change the different file names and if you really like you can set unique icons for the different file types.
It's also possible to nest the Asset Listing into a paint layout instead of a design customisation which allows you to control where it appears within the content of the page rather than in the design.