0

I have a content type recipe and for each recipe type content I want to add a link which can download the recipe for the user.

How can this be done in Drupal 8.5.2?

I'm not sure if I should provide a field to attach the file or if it should be done in some other way like creating a template adding the values to it dynamically and then generating a PDF for the template and attaching a download link for it.

  • Maybe you can elaborate more how you have set it up right now? Do you have a field for the upload attached to the node? – nhck Jun 21 '18 at 15:08
  • this is what im actually not sure about if i should provide a field to attach the file or if it should be done in some other way like creating a template adding the values to it dynamically and then generating a pdf for the template and attaching a download link for it. – user84459 Jun 21 '18 at 15:59
0

It sounds that you should be able to implement what you want like so:

  • Add a custom field to your recipe, assume you use a machine name like "file-containing-recipe" (change this name to whatever fits).
  • For the file-containing-recipe field, specify a field type "file", and combine it with whatever other configuration options that fit (eg: single value or multiple values, optional or mandatory, etc).

To verify your configuration, create a node of content type recipe, and use the newly defined "file-containing-recipe"-field to actually attach your file(s). After saving the new node, verify if the results are what you're asking for. If (still) not, go back to your "file-containing-recipe"-configuration to further tune any of its settings.

Done.

Your Answer

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