Folder View 2 Support Product Page

This topic is locked
Answered

How to SORT folders and insert links to the files [SOLVED]

Asked 17 Mar 2011 00:17:01
1
has this question
17 Mar 2011 00:17:01 Jan Freitag posted:
Okay - got the tree to display but the folders are not sorted, nor are the files under the folders. How to?

Also, how do I make the file name when clicked go to the file (<a href..>, so users can download the file?

Replies

Replied 17 Mar 2011 11:17:34
17 Mar 2011 11:17:34 Miroslav Zografski replied:
Hello Jan,

to enable the links in Folder View set this script tag right after the tree markup :

<script type="text/javascript"> 
// enable links in FolderView 
    jQuery(function() { 
	   jQuery("ul.dmxtree li a").click(function ( e ) { 
		   e.stopPropagation();  
		   return true; 
	   });
    }); 
</script>


About folders and Files ordering - how do you populate the tree : dynamically or you just display a selected flder content?

Regards,
Replied 17 Mar 2011 11:45:01
17 Mar 2011 11:45:01 Jan Freitag replied:
Hi Miroslav!

1. Re Linking

Can't seem to get this to work, so here is my source:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script language="javascript" type="text/javascript" src="ScriptLibrary/dmxFolderView.js"></script>
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Default/treestyle.css" />
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue/treestyle.css" />
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue_Folder1_64x64/treestyle.css" />
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue_Folder1_32x32/treestyle.css" />
</head>

<body>

<script type="text/javascript">
// enable links in FolderView
jQuery(function() {
jQuery("ul.dmxtree li a".click(function ( e ) {
e.stopPropagation();
return true;
});
});
</script>

<script language="javascript">
<!--
dmxListToTree({
slide : true,
struct : true,
fade : true,
bullets : "arrow",
clickOn : "row",
icons : true,
theme : "Blue_Folder1_32x32",
objId : "FolderView",
src : "./Clients/Test/",
server : "dmx_folderview.php"
});
//-->
</script>

<ul class="dmxtree Blue_Folder1_32x32" id="FolderView">
<li>Item 1</li>
<li>Item 2</li>
<li class="expanded">Item 3
<ul>
<li>Item 3.1</li>
</ul>
</li>
<li>Item 4</li>
</ul>

</body>
</html>

The above is all the code I use.

Thanks for your help!

Jan

Edited by - Jan Freitag on 17 Mar 2011  11:56:29


Edited by - Jan Freitag on 17 Mar 2011  12:15:19
Replied 21 Mar 2011 12:34:38
21 Mar 2011 12:34:38 Miroslav Zografski replied:
Hello Jan, Joern,

The code I passed to you must go AFTER the dmxTree markup. means it must go like this:

<script language="javascript">
<!--
dmxListToTree({
  slide   : true,
  struct  : true,
  fade    : true,
  bullets : "arrow",
  clickOn : "row",
  icons   : true,
  theme   : "Blue_Folder1_32x32",
  objId   : "FolderView",
  src     : "./Clients/Test/",
  server  : "dmx_folderview.php"
});
//-->
</script>

<ul class="dmxtree Blue_Folder1_32x32" id="FolderView">[*]Item 1[/*][*]Item 2[/*]
  <li class="expanded">Item 3[list][*]Item 3.1[/*][/list]
  [/*][*]Item 4[/*][/list]
<script type="text/javascript">    
// enable links in FolderView    
    jQuery(function() {    
       jQuery("ul.dmxtree li a").click(function ( e ) {    
           e.stopPropagation();     
           return true;    
       });   
    });    
</script>


Also need to point out that your files will ac just as if you have set links to them - meaning PDF may be opened in a browse, Images WILL be opened in the browser, *.doc and others Office documents will be provided for download.

Regards,
Replied 22 Mar 2011 02:45:15
22 Mar 2011 02:45:15 Jan Freitag replied:
Hi Miroslav

That still didnt work and now as soon as I enter a "Folder" (e.g. ./Clients/Test/" ) I get a blank result as well.

I am testing by:
  1. Creating a simple blank page and using the Folder View Extension in Dreamweaver (no linking script and no "Folder" ) - works.
  2. Then adding the "Folder" ("./Clients/Test/" or "Clients/Test/" or "/Clients/Test/" or "./Clients/Test" etc etc ) - displays a blank page (the first one ("./Clients/Test/" used to work - now doesn't )


  3. I know my server folder attributes are correct as I am using an open source php script to display folders and files (it is just not as nice as Folder View ).

    As much as I love what Folder View can do in theory, it is proving WAY too hard to implement in practice.

    Thank you for trying to help though - I do appreciate it.

    Regards

    Jan

    Edited by - Jan Freitag on 22 Mar 2011  02:45:58


    Edited by - Jan Freitag on 22 Mar 2011  02:46:45


    Edited by - Jan Freitag on 22 Mar 2011  02:47:08
Replied 22 Mar 2011 10:51:49
22 Mar 2011 10:51:49 Miroslav Zografski replied:
Hello Jan,

I'm sorry but the code view of the forum may have mislead you for the position of the script so I'm passing the code again ( this time without the code view):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script language="javascript" type="text/javascript" src="ScriptLibrary/dmxFolderView.js"></script>
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Default/treestyle.css" />
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue/treestyle.css" />
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue_Folder1_64x64/treestyle.css" />
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue_Folder1_32x32/treestyle.css" />
</head>

<body>
<script language="javascript">
<!--
dmxListToTree({
slide : true,
struct : true,
fade : true,
bullets : "arrow",
clickOn : "row",
icons : true,
theme : "Blue_Folder1_32x32",
objId : "FolderView",
src : "./Clients/Test/",
server : "dmx_folderview.php"
});
//-->
</script>

<ul class="dmxtree Blue_Folder1_32x32" id="FolderView">
<li>Item 1</li>
<li>Item 2</li>
<li class="expanded">Item 3
<ul>
<li>Item 3.1</li>
</ul>
</li>
<li>Item 4</li>
</ul>
<script type="text/javascript">
// enable links in FolderView
jQuery(function() {
jQuery("ul.dmxtree li a".click(function ( e ) {
e.stopPropagation();
return true;
});
});
</script>
</body>
</html>

Try out this way.

Regards,
Replied 22 Mar 2011 21:04:08
22 Mar 2011 21:04:08 Jan Freitag replied:
Hi Miroslav

The code is the same as I tried yesterday. I deleted all Folder View files off the server and tried a fresh load but it's still not working.

I have asked for a refund as this is getting nowhere. Thanks again for trying to help!

Cheers

Jan
Replied 12 Apr 2011 01:44:01
12 Apr 2011 01:44:01 manuel pinto replied:
Wish to have the solution for this situation because i've got the same problem ...??? it is not supposed to have a behaviour to call the script???!!!!

Edited by - manuel pinto on 12 Apr 2011  02:12:13


Edited by - manuel pinto on 12 Apr 2011  02:12:41
Replied 12 Apr 2011 10:13:12
12 Apr 2011 10:13:12 Miroslav Zografski replied:
Hello ,

The provided solution was only fro enabling links in Folder view.
Sorting Folders is something that is not available as functionality in the current version of the Folder view.

Regards,
Replied 12 Apr 2011 13:17:09
12 Apr 2011 13:17:09 manuel pinto replied:
Hello again, how can i enable links in folder view?? Sorry the question ... i'm not an expert in this area. thanks for the help ... could be a nice improvement for an update of the extension

Edited by - manuel pinto on 13 Apr 2011  00:37:47
Replied 14 Apr 2011 10:01:53
14 Apr 2011 10:01:53 Miroslav Zografski replied:
Hello manuel,

By adding this code right after the folder view markup in your page:

<script type="text/javascript">
// enable links in FolderView
jQuery(function() {
jQuery("ul.dmxtree li a".click(function ( e ) {
e.stopPropagation();
return true;
});
});
</script>

Regards,
Replied 14 Apr 2011 12:08:16
14 Apr 2011 12:08:16 manuel pinto replied:
Hi, thanks for your answer, but it's not working at all. Here's the page i'm testing: www.secretspotwines.com/untitled.php
Replied 11 Aug 2011 17:55:34
11 Aug 2011 17:55:34 Miroslav Zografski replied:
Hello all,

Please, do excuse my stubborn behaviour on this matter.

The resolution is simple:
You need to set a behaviour when a file item is clicked to go to the location of that file you do this by selecting the Folder view in DW and clicking the paper Clip icon in the Property Inspector.
Then You select from the list of Available events the one named "When file item is clicked" and from the list of available behaviours "GoToURL" then clicking on the right pointing blue arrow the UI of the Go TO URL will appear
In the URL field you set this:
{path}

and you click Ok your way out of this.
Save the page and test it.
Replied 10 Sep 2011 23:58:32
10 Sep 2011 23:58:32 manuel pinto replied:
Excellent!!!!!

Reply to this topic