Jahia in English > Document List

0 (0 Good)
0 (0 Bad)

Document List

by  mholmberg »  2013/07/03 13:56

hello back

I am trying to have a dokument list with links of files that are uploaded via file reference. I need to filter this list based on the categories these documents belong to. I extended the filter-list in order to display the files. My only problem now is that the url link is not targeting the file location path but the path of the node.

<a href="${currentNode.url}"
           title="${fn:escapeXml(not empty title.string ? title.string : currentNode.name)}">
                ${fn:escapeXml(not empty refTitle ? refTitle : not empty title.string ? title.string : currentNode.name)}

        </a> 

 

this is the piece of code that is used by the base.file.jsp and that I used in my customized filter-list . But the url is not correct. 

 

thanks

  • Document List
    2013/07/03 13:56

    mholmberg <p> hello back</p> <p> I am trying to have a dokument list with links of files that are uploaded via file reference. I need to filter this list based on the categories these documents belong to. I extended the filter-list in order to display the files. My only problem now is that the url link is not targeting the file location path but the path of the node.</p> <div> &lt;a href=&quot;${currentNode.url}&quot;</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;title=&quot;${fn:escapeXml(not empty title.string ? title.string : currentNode.name)}&quot;&gt;</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ${fn:escapeXml(not empty refTitle ? refTitle : not empty title.string ? title.string : currentNode.name)}</div> <p> &nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;&nbsp;</p> <p> &nbsp;</p> <p> this is the piece of code that is used by the base.file.jsp and that I used in my customized filter-list . But the url is not correct.&nbsp;</p> <p> &nbsp;</p> <p> thanks</p>

  • Number of messages  22
    Registration date Jul 3, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Document List

    by  mholmberg »  2013/07/04 15:07

    I think I could eventually use smth like select * from [jnt:fileReference] but where I can find all the properties for jnt:fileReference that I get from select?

  • Re: Document List
    2013/07/04 15:07

    mholmberg <p style="text-align: justify; "> I think I could eventually use <font color="#333333" face="Arial, Helvetica, sans-serif"><span style="line-height: 18px;">smth like&nbsp;</span></font>select * from [jnt:fileReference] but where I can find all the properties for jnt:fileReference that I get from select?</p>

  • Number of messages  22
    Registration date Jul 4, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Document List

    by  shyrkov »  2013/07/15 14:16

    Hello,

    I guess, you get "currentNode" in your case as actually thenode which points to the target file node.

    So, you could do (you can find an example if your <jahia-web-app-dir>/modules/default/jnt_nodeLink/html/nodeLink.jsp):

    <jcr:nodeProperty node="${currentNode}" name="j:node" var="reference"/>

    <c:set var="node" value="${reference.node}"/>

    <a href="<c:url value='${node.url}'">My file</a>

     

    And in order to get information about particular node type definition and its properties you could go into Jahia Tools Area (http://[server]:[port]/tools - protected by the basic auth with the user, you've specified during the installation, usually: jahia/password) and use "Installed definitions browser":

     

    Kind regards

    Sergiy

  • Re: Document List
    2013/07/15 14:18

    shyrkov <p> Hello,</p> <p> I guess, you get &quot;currentNode&quot; in your case as actually thenode which points to the target file node.</p> <p> So, you could do (you can find an example if your &lt;jahia-web-app-dir&gt;/modules/default/jnt_nodeLink/html/nodeLink.jsp):</p> <p> &lt;jcr:nodeProperty node=&quot;${currentNode}&quot; name=&quot;j:node&quot; var=&quot;reference&quot;/&gt;</p> <p> &lt;c:set var=&quot;node&quot; value=&quot;${reference.node}&quot;/&gt;</p> <p> &lt;a href=&quot;&lt;c:url value=&#39;${node.url}&#39;&quot;&gt;My file&lt;/a&gt;</p> <p> &nbsp;</p> <p> And in order to get information about particular node type definition and its properties you could go into Jahia Tools Area (http://[server]:[port]/tools - protected by the basic auth with the user, you&#39;ve specified during the installation, usually: jahia/password) and use &quot;Installed definitions browser&quot;:</p> <p> <a href="http://img834.imageshack.us/img834/1500/70xd.png"><img alt="" src="http://imageshack.us/scaled/thumb/834/70xd.png" style="width: 125px; height: 90px;" /></a></p> <p> &nbsp;</p> <p> Kind regards</p> <p> Sergiy</p>

  • Number of messages  407
    Registration date Jul 15, 2013
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page