goldsky / FileDownload-R

FileDownload snippet for MODX revolution
12 stars 7 forks source link

Path navigation #4

Closed int99h closed 11 years ago

int99h commented 12 years ago

How to use path as navigation (with links)? like: root-link / dir1-link / dir2-link/

Inconvenient always click browser back-button.

goldsky commented 12 years ago

&browseDirectories=1

I does the job.

int99h commented 12 years ago

browseDirectories enabled... i just see the path without links.

goldsky commented 12 years ago

Not even like this? http://imageshack.us/photo/my-images/26/breadcrumbspath.jpg/

What is your complete call?

int99h commented 12 years ago

[[FileDownload? &getDir=media/ &browseDirectories=1]]

http://imageshack.us/photo/my-images/14/19967018.jpg/

int99h commented 12 years ago

tpl-group-dir.chunk.tpl: my: `<tr[[+fd.class]]>

.../[[+fd.groupDirectory:replace=/var/www/itbizu/ftp.itbiz.com.ua/media/==]]
</tr>`

original: `<tr[[+fd.class]]>

[[+fd.groupDirectory]]
</tr>`

any ideas?

goldsky commented 12 years ago

The breadcrumb is [[+fd.path]] in the wrapper chunk. https://github.com/goldsky/FileDownload-R/blob/master/core/components/filedownload/elements/chunks/tpl-wrapper.chunk.tpl Does it exist?

Why do you replace the path? What if you set it back as usual? This is the breadcrumb method: https://github.com/goldsky/FileDownload-R/blob/master/core/components/filedownload/models/filedownload/filedownload.class.php#L1152

int99h commented 12 years ago

wrapper:

`

[[+fd.path:notempty='<tr[[+fd.classPath]]>
    <td colspan="4"><strong>Path: [[+fd.path]]</strong></td>
</tr>':default='']]
[[+fd.rows]]

Файл Загрузок Размер Дата
`

goldsky commented 12 years ago

try to use backslash before the square bracket and back tick [[`

goldsky commented 12 years ago

do you use non-ASCII character for the folder name?

int99h commented 12 years ago

folders and files english only... with native files - no changes core/cache/ - clear... no changes

goldsky commented 12 years ago

try upgrade the latest update

int99h commented 12 years ago

fd.path return nothing...

int99h commented 12 years ago

fd.groupDirectory return non-clickable path

greyskymedia commented 12 years ago

I think the new modx phased what you were using to get the breadcrumb path... i think that's the issue int99h was seeing. What i did to hack it was just edit the tpl-wrapper.chunk.tpl to just add:

    <td colspan="4"><strong>Path: <a href="[[~45]]">[[~45]]</a></strong></td> where 45 is the main directories parent. 

Now of course this won't work for multi-level folders, but for my purposes its a quick and dirty hack that will work.

goldsky commented 11 years ago

I got it. This doesn't work when crawling folders without having files. Will make the fix.

goldsky commented 11 years ago

@goldsky,

I got it. This doesn't work when crawling folders without having files. Will make the fix.

Apparently, that is not the case, I missed out because I changed the wrapper template file on my test. But I did make the improvement for breadcrumb. https://github.com/goldsky/FileDownload-R/commit/cded7514faa0954652cfd8eff4231163c8c42252

dhoelker commented 11 years ago

same Problem here: fd.groupDirectory return non-clickable path. Using ModX 2.2.2 and the latest FileDownload R via Packagemanagement.

goldsky commented 11 years ago

@dhoelker, what is your snippet call?

dhoelker commented 11 years ago

hi goldsky,

thats my snippet call

[[!FileDownload? &getDir=`assets/downloads/` &browseDirectories=`1` &groupByDirectory=`1`]]

thx for help

Edit: My System: PHP Version 5.3.3-7 Debian Squeeze13

dhoelker commented 11 years ago

pleeease help me :-/

goldsky commented 11 years ago

how is your folder structure? what's the content of core/components/filedownload/elements/chunks/tpl-wrapper.chunk.tpl ?

goldsky commented 11 years ago

fixed in here https://github.com/goldsky/FileDownload-R/commit/a178783e90aed85001ac4de0286ce7992d365b29

dhoelker commented 11 years ago

You are the man!!! thank you =)