1

Sorry for another "In Wordpress..." question but here we go...

In Wordpress, I can use ACF to add custom fields to a single page. This is done either in code or in the GUI by basically doing something like (pseudocode),

if id = 123
  add_field "Phone Number"
end 

This is especially useful on homepages or landing pages where the layout is unique and I want to provide structured data entry without needing to create a custom type that is only used once. In Drupal, I dont see a way to dynamically add fields to an arbitrary piece of content. Is this possible? How?


Wordpress custom fields: enter image description here

  • 1
    I would actually add a new content type just for this case ... or perhaps you can play around with paragraphs they might fit you are trying to accomplish – GiorgosK Mar 8 '18 at 18:37
  • As I was writing the question, I was thinking that I may just have to resort to single-use content types. It feels a little overkill, if I can get past that, then it seems to hit on all the other requirements I am looking for. – Jeff Mar 8 '18 at 18:40
2

If you are using Drupal 8, you can create a block type and add fields to it. Then create a block of your block type and on visibility rules you can assign it to a specific page.

If you're using Drupal 7, you can do the same, but you'll need the Bean module

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.