Search code examples
typo3fluidfalfluid-styled-contentfile-link

FAL file title won't show in front-end with file collection "folder from Storage"


.

Hello it's hard to explain ...

If you're using TYPO3 7.6 (w. fluid styled content) with the module "file links", you can upload single files, but you can also work with the "file collection" to organize your downloads in a sys-folder.

There're three different types of "file collections". 1. Static selection of files and 2. Folder from Storrage and 3. Select by category.

Now you've upload and edit your FAL-files (metadata, s. image below) with a new title and description. These fields e.g. {file.title} will show with fluid_styled_content (Uploads.html), if you're using a single download or a file collection static selection of files, but not, if you're using Folder from storrage! The title won't show, you only see the {file.name} ..?

I'm using the standard Uploads.htmlform FSC with an extra condition. Test <f:debug>{file.title}</f:debug>, see below. There's no Title from files via "folder from storrage".

...
 <f:if condition="{file.title}">
    <f:then>
      {file.title} 
    </f:then>
    <f:else>
      {file.name} 
    </f:else>
</f:if>
...

Is it a bug or a feature for TYPO3 8?

I hope my pictures can explain this behavior better.

select file collection

show file collection in front end with fluid styles content FSC

Insert Title (FAL)

f:debug file.title


Solution

  • There was a TYPO3 Core Bug, but now it's fixed (TYPO3 7.6.15) - update Core and Fluid Styled Content-Template Uploads.html

    Line 26

    <a href="{file.publicUrl}"{f:if(condition:data.target,then:' target="{data.target}"')}>
      <span class="ce-uploads-fileName">
        <f:if condition="{file.properties.title}">
        <f:then>
            {file.properties.title}
        </f:then>
        <f:else>
            {file.name}
        </f:else>
        </f:if>
      </span>
    </a>
    

    Thanks to the TYPO3 Core Development Team! See revision.