getProjectFiles() not working on layout_projects.php

danieljacobykrateil's Avatar


12 Jul, 2014 10:55 AM

I'm trying to use the getProjectFiles() function (instead of just using projectContent()) to customize the way my content is displayed. This is working fine for my menu, that is, when loading projects_list.html through layout_default.php. But when I try to do exactly the same (with almost exactly the same code) to display a single project on layout_projects.php, then it doesn't display anything. It outputs an empty array. projectContent() however works normally. But I really need to use getProjectFiles().

  1. Support Staff 1 Posted by Mikael on 20 Aug, 2014 11:50 PM

    Mikael's Avatar

    You can supply an id to the function. So send it the id number or slug of the project you want to display - you can use other template tags to get that information if you need it to be dynamic.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac