Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01/18/2007 9:44 AM by  Peter Donker
Understanding the File Lists (ViewCollection)
 17 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Earnie Eng
New Member
New Member
Posts:28


--
05/04/2006 8:27 PM
    The documentation explains that in order to customize the columns displayed in ViewCollection, ViewCategory, and ViewSubscriptions we must modify the corresponding .resx file.  The correct syntax is a single line of column definition seperated by semicolons.  Within each of these columns, there are 10 variables available for customization, each seperated by a | symbol (pipe)

    I was able to add the Remarks column based on the documentation, however, when analyzing the default structure of these columns, I notice that the second entry has much more than 10 variables:

    TemplateIcon||24|||||~/DesktopModules/Bring2mind/DMX/images/View.gif|Details||EntryId||EntryId=[PARAMETERS]&Command=Core_ViewDetails|False||~/|Icon16||||;

    Is there an alternate syntax that isn't noted in the documentation?

    My goal is to change this column (the one that displays the icon of the filetype) to behave identically as the file description itself.  As it is not intuitive to the user that this is how you view details of the file.  Then I would like to add another column with just that Magnifying Glass icon for users to view details of the document.

    Any help would be appreciated!
    Andrew Haslett
    New Member
    New Member
    Posts:18


    --
    05/05/2006 12:13 AM
    Hi Earnie.

    I've done this at work. We set it up so that clicking on the name opens the document, the icon is there purely to indicate what type of file it is (it is not clickable) and we have a small (i) icon on the right hand side, which when clicked upon opens up the detail screen.

    It was an older version though, and I needed to change the source code to do this at the time (there were some other changes to make also). We are about to upgrade to the latest version where I don't think this is required, but I can check it out for you if you like?

    Cheers,
    Andrew
    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    05/05/2006 12:14 AM
    Earnie,
    I'm afraid that what started out as an attempt to make columns tailorable, turned into a too complex solution. I want to rework this part of the solution in a future version. For now I'll help anyone with specific column wishes. Here is what happens to the parameters:
    ''' Template for a column
    ''' 0: Name (i.e. in DB)
    ''' 1: Title
    ''' 2: Width in pixels
    ''' 3: CssClass
    ''' 4: Template (for dates)
    ''' 5: Show link or not
    ''' 6: Sort Expression
    ''' 7: Header ImageUrl
    ''' 8: Alternate text for icon
    ''' 9: EntryType starts with
    ''' 10: Id Field
    ''' 11: Description Field
    ''' 12: Parameters
    ''' 13: Open in new window
    ''' 14: Image Url
    ''' 15: Image Url Prefix
    ''' 16: Image Url Field
    ''' 17: Image Url No
    ''' 18: Image Url Yes
    ''' 19: Visibility Field
    The first (0) parameter can also be one of
    - "StatusDeleted", "StatusLocked", "StatusApproved", "StatusPrivate", "StatusAttention": generates an icon corresponding to that status
    - "DownloadFileIcon" generates an icon of the file type that now points to the details page (used to be download)
    - "ActionDownload" generates an icon for download
    - "ActionJump", "ActionJumpNew" for hyperlinks
    - "Description" shows title with link to default action
    - "FileCheckBox", "FileSize" self-explanatory
    - "TemplateLink", "TemplateIcon", "TemplateIconYesNo" direct access to columns template types
    - "Collection" showing collection name and link to that

    I hesitate in the redesign about 2 directions:
    1. complete control for the customer by pouring the file list into a separate ascx
    2. guiding the customer by using an xml file (improvement on the current solution using pipe symbols and semicolons).
    The advantage of the former is that .net programmers can more easily adapt the rendering. The disadvantage is that non-net programmers probably find this harder. This will be a liability as it might break the working of the module if not correctly done. The advantage of the second is that it stays close to what is already there and this can thus be done quickly.

    Peter
    Earnie Eng
    New Member
    New Member
    Posts:28


    --
    05/05/2006 12:22 AM
    Being a .Net developer (albeit newbie) I prefer the former! [;)]
    Earnie Eng
    New Member
    New Member
    Posts:28


    --
    05/05/2006 12:39 AM
    Thanks for this detailed list of parameters.

    I make the assumption, then, that we are not limited to just 10 paramters or the x amount you used in the initial build.  But that we can use any number as long as we have | dividers up to the paramter we want to use.

    such as if I wanted the Remarks to show, I don't have to have all the trailing empty parameters:
    Remarks|Remarks|350

    as opposed to
    Remarks|Remarks|350||||||||

    (note, I tried it out and it worked on DMX 3.3.1)

    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    05/09/2006 12:40 AM
    Earnie,
    Almost. As I've said, this part of the code is far from perfect and needs a major revision. You'll find that leaving out some of the pipe symbols might give rise to issues. Start your debugging by adding the pipe symbols to the required number. I know it doesn't help legibility, but it is the safest.
    Peter
    peter schotman
    New Member
    New Member
    Posts:29


    --
    09/01/2006 10:11 AM

    Peter,

    I would suggest the XML solution. The main advantage is that:

    1. for earch attribute not being specified one can use a default
    2. a check for a well formatted document is relatively easy
    3. you don't have to be a programmer to change the thing...

    Peter

    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    09/01/2006 10:29 AM
    I agree with with the advantages for XML. The following are the advantages for using ascx:

    1. Way more powerful a solution to provide custom layout. Not only can you change the ascx, but you potentially add an ascx that inherits of another dll so you can do processing logic behind if you want. That way you can do almost anything. DMX just provides the data and tells it when to render.
    2. Faster as it does not need to be parsed and turned into a control first

    As a reaction to your 3rd point: I find people asking to tune file list layout are either programmers themselves (providing a custom solution for an intranet somewhere) or IT staff that might know just enough of asp.net to make basic changes to an ascx file.
    ben murph
    New Member
    New Member
    Posts:4


    --
    12/13/2006 5:58 AM
    Hi all,
    Can anyone shed some light on the Visibility Field parameer and what values it can take? I was hoping to use this to make the View Details column only visible to Site Admins...

    Any and all advice much appreciated :)

    Ben
    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    12/13/2006 10:01 AM
    You can point it to a boolean column that tells the renderer whether to show this thing or not. It is used in the Icon templates where, for instance, the column 'IsApproved' determines whether or not a Not approved icon shows up.
    ben murph
    New Member
    New Member
    Posts:4


    --
    01/02/2007 5:27 AM
    Hi, from my understanding of the parameters listed above the following should open the link in the same window:

    Description|Page Title|300|FileGrid_Description||True|Description||||||Default|False|||||||

    where I'm guessing the 'False' in Column 13 controls this behaviour. However it doesn't make any difference to my links (they still open in a new window). I've tried Yes, No, True, False and _same but without any success. If anyone could shed any light on this that would be fantastic.

    Many thanks in advance,
    Ben.

    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    01/07/2007 6:27 PM
    Ben,
    The 'Description' column is handled in a custom way and ignores this setting. Try the following:
    TemplateLink|Page Title|300|FileGrid_Description|||||||EntryId|Description||False|||||||
    What I've changed:
    0 - TemplateLink
    10 - Id Field (what to use in the link parameters)
    11 - Description Field (text to show)

    Peter

    ben murph
    New Member
    New Member
    Posts:4


    --
    01/10/2007 4:35 AM
    Hi Peter,
     Thanks for the reply. I've tried to incorporate the suggested parameters but am not having a great deal of luck. If I use the 'TemplateLink' as the first parameter it returns a page with:

    'A critical error has occurred.
    Object reference not set to an instance of an object.'

    If I replace 'TemplateLink' with 'Description' then it loads fine but the only column which is selectable is the final one to view the details.

    Would it be easier to use a different column for the link rather than the Description? I've included the ColumnList.Text value as I'm using it in the ViewCategory.asc.resx file in case there's a conflict or similar.

    Previous Value (works but first column link opens in a new window):
    Description|PageTitle|300|FileGrid_Description||True|Description||||||Default|False|||||||;
    Remarks|Description|400|FileGrid_Summary|;
    TemplateIcon||24||||||||EntryId||EntryId=[PARAMETERS]&Command=Core_ViewDetails|False|Images/Transparent.gif|~/||||||||

    Testing Value (doesn't work unless I replace the 'TemplateLink' with 'Description' as the first parameter):
    TemplateLink|PageTitle|300|FileGrid_Description|||||||EntryId|Description||False|||||||;
    Remarks|Description|400|FileGrid_Summary|;
    TemplateIcon||24||||||||EntryId||EntryId=[PARAMETERS]&Command=Core_ViewDetails|False|Images/Transparent.gif|~/||||||||

    Many thanks for all your help so far with this :)
    Ben.

    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    01/10/2007 10:22 AM
    Ben,
    You are using a recent version of DMX?
    Peter
    ben murph
    New Member
    New Member
    Posts:4


    --
    01/11/2007 1:39 AM
    Hi Pete,

     We're using version 03.04.08.

    Regards,
    Ben.
    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    01/11/2007 11:04 AM
    Sorry, I left out parameter 12: Parameters. It should be
    TemplateLink|Page Title|300|FileGrid_Description|||||||EntryId|Description|EntryId=[PARAMETERS]|False|||||||
    for the column you want

    Peter
    abhi
    New Member
    New Member
    Posts:3


    --
    01/14/2007 8:37 PM
    Hi Ppl,
    Is there a column that could tell the file is newly uploaded like some icon indicating the file uplaoded is new and had not been downloaded or viewed even once.
    I was trying to use Status|Status|||{0:d}||||Attention but it didn't work.
    Any help would be appreciated.
    Thanks!
    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    01/18/2007 9:44 AM
    There is not a column like that, because you'd have to define what is new. The challenge there is to find some date that you can use as threshold. The 'attention' works because it is used in conjunction with the recorded last date you accessed a document you subscribed to. If you're not subscribed to a document, no access time is recorded, however.
    There is however another solution, which is to use the WhatsNew addon. That shows a list of documents sorted by the time of upload. Download it here on this site. I realize it does not show 'new' in the regular DMX, but it is as close as it gets now.
    Peter
    You are not authorized to post a reply.