Show in groups

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
admin
Site Admin
Posts: 65017
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Show in groups

Post by admin »

Tip: Instead of posting a screenshot of the column configuration right-click the Clear button, copy the snippet, and post the snippet. Then it is very easy for another user to create the column by pasting the snippet.

autocart
Posts: 1356
Joined: 26 Sep 2013 15:22

Re: Show in groups

Post by autocart »

..if the other user knew about this snippet-trick and how to apply it ;)
Here is my snippet:

Code: Select all

Snip: CustomColumn 1
  XYplorer 13.80.0134, 24.03.2014 13:54:40
Action
  ConfigureColumn
Caption
  Grp
Type
  3
Definition
  perm $grouping_strings_used;
  perm $grouping_sortedby;
  if (get("CountItems") == 1) {
    $grouping_strings_used = "";
    $grouping_sortedby = substr(get("Sort"), 0, strpos(get("Sort"), ","));
  }
  
  $current_grp_str = getpathcomponent(<cc_item>,"ext");
  if (<cc_isfolder>) {
    $current_grp_str = " ";
  }
  
  if (strpos($grouping_strings_used, $current_grp_str) >= 0) {
    return "";
  }
  else {
    $grouping_strings_used = $grouping_strings_used . $current_grp_str . "|";
    return $current_grp_str;
  }
Format
  0
Item Type
  2
Item Filter
  

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Show in groups

Post by LittleBiG »

I copied it from here and I tried to paste with Paste as Snippet. It was imported until it reached the the first empty line :-(

admin
Site Admin
Posts: 65017
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Show in groups

Post by admin »

Interesting, that's actually a bug of the forum software which returns one space less than it should for empty code lines. Anyway, the next beta will work around this. It will also allow a global indent for snippets, so you don't have to unindent it manually.

Post Reply