1

I am building a site in which authenticated users may upload files. When such a user is viewing URLs of a certain content type, I would like the left sidebar to contain, among other things, a file control. The right column of an unauthenticated user holds the login controls, and that column must hold something else for authenticated users who have not accepted the required condition. My goal is to have the user perform the upload while also reading the content. Hopefully, this improves retention.

At any rate, I need a block which contains a file field. I have been trying to do this with Node Fields Block. So far no success.

I added a hidden file field to my content type, installed and enabled node_fields_block, and added a Node Fields Block which is enabled for pages of my content type and which contains the File. I've created a 'Node Fields Block' display mode for the content type in which the file is supposed to appear, but nothing shows up. I've looked at the generated HTML and the block isn't being generated.

I'm at a loss. Any help greatly appreciated.

0

The last time I tried node fields block, some of the fields doesn't really show. So I just switched to using the views blocks. it's just the same. Just insert the fields you wanted to show. If you want users to upload files on the current page you could try Block upload - it's a simple module, which allow users to upload images/files into field without node edit page.

Did I understand your case correctly?

  • Yes. I am trying block upload. It configures nicely but, so far, I can't get it to show up on a page. – LenB Apr 14 '15 at 12:58
  • Still unable to get it to appear on a page. I installed the module, set permissions so anyone can upload, and place the block in my sidebar. The sidebar shows up but no file upload. – LenB Apr 14 '15 at 16:29
  • The block will normally appear if that node has the field. For example, on my event content type I have field_image. The block upload that uses field_image will appear on my event pages. I tried it now on a new drupal instance, created a file field on article content type, used the block upload. It seems to show the block upload on the article pages. – Danz Apr 15 '15 at 3:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.