Closed (fixed)
Project:
FileField
Version:
5.x-2.3-rc4
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 May 2008 at 22:00 UTC
Updated:
1 Aug 2008 at 17:28 UTC
I am sorry if I am missing something obvious but I don't see any documentation how to show the list in .php.tpl file. If someone can direct me to a resource I would appreciate it.
Thanks,
Steve
Comments
Comment #1
jpetso commentedWith "the list" I guess you mean the list of files in the node view? If I'm not mistaken, that should be a member variable of the rendered $node object - you could include a
in your .tpl.php file and pick the right variable from there. As for documentation, I believe there is none (except for previous support requests and various snippets on drupal.org maybe).
Does that answer your question?
Comment #2
skesslerI did that I can not find whats wrong with this code?
print $field_article_pdf[6]I am trying do
<a href="<?php print $field_article_pdf[6] ?>" target="new"> <?php print $title ?> </a>in the long run. Any help is much appreciated.
Thanks,
Steve
Comment #3
bchoc commentedThere is no [6] in that array. It is an array with an array in it.
Comment #4
skesslerThanks Brian, I did not know there could be an array in an array. The first array index is [0] the second index can be referenced with the name of the index [filepath]
Please note that in this example $field_article_pdf is the name I chose for the filed when I added it to my node type.
If I was going to write documentation for this module how would I go about doing that?
Thanks,
Steve
Comment #5
jpetso commentedI guess the most useful way would be to create a FileField handbook where information like that should go in the future. So I just created one... but without real contents yet. The only thing that we now need is content - if you're going to help out with documentation, just write up a generic use case (say, yours) and solution in a few nice sentences, I can then copy that to the appropriate handbook page.
Thanks for your involvement, maybe FileField can finally get some proper documentation soon :)
Also mind that string keys for arrays should be enclosed in quotes, like
$field_article_pdf[0]['filepath']. PHP also works without those quotes, but that's ugly and one of the more despisable features of that language.Comment #6
dopry commentedComment #7
dopry commentedThe documentation link has been added to the project description.
Comment #8
skesslerI see where the document is to edit but where do go to edit the node.
Thanks,
Steve