rejetto forum

%number% in [folder]

Foggy · 10 · 5209

0 Members and 1 Guest are viewing this topic.

Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
I was thinking that if we had a way to get the number of items in a folder(not the current folder but subfolder's of the current folder) we should be able to make use of the new macros(or create one) to get multipage file systems quite easily.

I've got plenty of time on my hands currently and I'm thinking of having a go at creating a template based on a forum I visit and I've got the perfect idea of how to use this.


Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
That is something very close related to the folder-tree-generation problem.

I wonder if rejetto could open the most powerfull macro of hfs that was there already before macros were named: %list% !

list is now hidden and could be understood as (I use here %..% instead of {{section|..}} to read it easier) :

{{list | %encoded-folder% | %folder | %file% | %link% }}

If %list% could be opened in such a manner, and if we could add two parameters: recursive and filter we would greatly enhance the possibilities:
we  could create a foldertree and the filelist in one step:

{{list | 'root'| %foldertree% | | | 'recursive'}}
{{list | %encoded-folder% | %folder | %file% | %link% }}
in this example %foldertree% would only add the item-url% and name to an array in javascript.

or we could do what foggy wants:

{{list | %encoded-folder% | %recfolder% | %file% | %link% }}
....
[recfolder]
{{list | %Item-url% | %foldercountitems% | %filecountitems% | %linkcountitems% }}
or:
{{list | %Item-url% | | %filecountitems% |||'filesfilter'}}
in this example also it is supposed to use arrays for the filelist iith a counterelement in the case of folders (perhaps in place of size).










your computer has no brain - use your own !


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
I was thinking that if we had a way to get the number of items in a folder(not the current folder but subfolder's of the current folder) we should be able to make use of the new macros(or create one) to get multipage file systems quite easily.

to know the number of files in every subfolder we must scan the whole tree every time.
even with virtual folder, a file listed there may not exist on disk anymore.
but, anyway, with real folders for sure.

i don't understand how subfolders are related to "multipage".


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
i don't understand how subfolders are related to "multipage".

if you can get the number of items in the subfolder you could easily divide that by 10,20,25,etc to get the number of pages and then create links with offset.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
why should i want to have the pages of a subfolder?


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
so you can choose which page of the folder to goto from the list instead of going into the folder first.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
and how do i know the number of the right page before i even enter?


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
You don't but if you are searching for something specific you use ?search=


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
I get the feeling that what I'm trying to say isn't being fully understood so Ill try and explain it a bit better.

What I ask is that we be able to use %number% in the list on folders to list the amount of items like it does once you are inside the folder.

If we can get the amount of items, it would then be easy to write some javascript or other code that will use offset to create links to pages.

eg.

name:Folder123 Items:66 page:1 2 3

name:Folder456 Items:7 page:1

etc

I hope that makes a bit more sense because it could be useful.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i use the pages when i have an idea of the content (then i'm already in), and try to figure it out the right page.
i would not enjoy such links.

what you explained in your last post is exactly what i imagined at start, but it had no sense in my mind.