plainblack.com
Username Password
search
Bookmark and Share

    

File asset shortcut within a folder asset

User Dirk_S
Date 10/6/2011 8:25 am
Views 265
Rating -2    Rate [
|
]
Previous · Next
User Message
Dirk_S

In the common download area of our website I use a folder asset which should includes the available download
files as a list (each download file is a file asset). If I create a shortcut of such file asset and add
this file shortcut to a separate folder asset on a product page, then I have no more access to the shortcut
properties (like fileIcon, fileSize etc) of the shortcutted file asset. The folder template on the product pages
takes the fileIcon as well as fileSize from the shortcut asset and not from the shortcutted file asset. Is there way
to use the properties of shortcutted file asset within this separate folder template?    

Thank you in advance for any hint.

Bye

Dirk

--- (Edited on 10/6/2011 8:25 am [GMT-0500] by Dirk_S) ---

--- (Edited on 12/22/2011 8:26 am [GMT-0800] by perlDreamer) ---



Back to Top
Rate [
|
]
 
 
perlDreamer

When a folder makes a list of its children, it asks each one for the fileIcon, fileSize and so on.  A shortcut asset (regardless of what it's shortcutting) doesn't have any of those properties.

It would be an interesting feature to add to the Folder, to have it check for Shortcuts, and to check to see if the Shortcut is a File/Image Asset, and then display the information for original asset instead of a shortcut.

Really, a Shortcut has 1, and only one use, and that's to see the main/view method for an asset.  Anything else that you do, like get the next page of results, edit, have a parent/child relationship will not do what you think it does for a Shortcut.

--- (Edited on 10/6/2011 8:27 am [GMT-0700] by perlDreamer) ---



Back to Top
Rate [
|
]
 
 
rogier

>> Is there way to use the properties of shortcutted file asset within this separate folder template?

Actually, yes! And it's one of my favorite WebGUI templating tricks.

Create a new folder template with this code:

<tmpl_loop file.loop>
  ^AssetProxy(<tmpl_var url>);

</tmpl_loop>

Note: this is off the top of my head, so check the syntax!

Now the folder template will display the file asset itself. You can use the file's usual template or make a new one and override it in the shortcut overrides. Add HTML if and when needed.

Easy peasy lemon squeezy :-)

Rogier

--- (Edited on 11-01-2012 18:30 [GMT+0100] by rogier) ---



Back to Top
Rate [
|
]
 
 
rogier

Or, I suppose, make shortcuts of the folder assets on the product pages instead of the files themselves.

R.

--- (Edited on 11-01-2012 18:34 [GMT+0100] by rogier) ---



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved