Asset Listing results - pdf files

I was wondering what the keywords are to display the file size and type of PDFs? Am I correct in assuming I will have to do it based on the metadata, or is there another keyword I don't know about…? Just checking :slight_smile:


We are using version v3.6.0. RC2.



I noticed that the asset listings return an error such as:


    MySource Warning  
    File: [SYSTEM_ROOT]/core/include/asset_manager.inc Line: 4828 
    Message: Unable to find an lineage for the URL "..." [SYS0246] 
    Backtrace: Show


Below the error it displays the asset listing itself just fine.
Is it best to hide these error messages? Is there anything else I should check to try and rectify the problem?

Unsure about the file type of PDFs, for the file size though, there are a couple of keywords that can be used for all file asset types, PDF Files included. For a 7.0 kB PDF file (for instance), you can use the following keywords:


%asset_file_size_in_bytes% - which would be replaced with “7168” in this case

%asset_file_size_readable% - which would return a “friendly” value like “7.0 kb”



(These are the keywords that are actually entered into the bodycopy, they’re something similar in the keyword drop-down if you use that.)



The ‘unable to find a lineage’ error is a known issue (bug #804) and a fix will be available in the next release (3.6.0 Final).

[quote]I was wondering what the keywords are to display the file size and type of PDFs?
[right][post=“6569”]<{POST_SNAPBACK}>[/post][/right][/quote]



Luke has mentioned the file size keyword – from the point of view of type display, you can create a Customised Asset Format bodycopy (on the Display Formats page of the asset listing) and hardcode a PDF icon or similar into the bodycopy. If you’re listing multiple file types (e.g. Word, PDF and Images), you could create a custom bodycopy for each, so that they have a unique icon when displayed.

Thanks heaps :slight_smile:


We will be using multiple file types. Its only just occured to me that we will only want to display the file size for file types that aren't HTML (eg word, pdf etc.) Creating a custom asset format bodycopy is probably the best approach to take. The asset listing is being used to display a number of publications which has custom grouping.



Another thought I just had was to display a metadata description (or something shorter and similiar) when the mouse hovers over the link (eg. <a href="#link" title="Impressive"> Impressive</a>. Are any other sites currently doing this, that you know of?