1

I'm new to Drupal and trying to add a single new page to an existing Drupal website. It has its own design (with its own css) and its own content requirements separate from the rest of the site.

I'd like to be able to define a set of custom fields for the page, and then use a specific twig template to render those fields.

Is this possible? I'm struggling to find a way to do this.

I get most of the way there with a custom content type. I can create all the fields I need for the page. But, I don't want it to function as a repeatable content type, but rather as a one-off page that has a specific, single path.

When I try using Page Manager to create a page, I get presented with what looks like a WYSIWYG kind of editor for laying out blocks/panels on the page. I'm hoping to rather simply be able to define a set of fields and use the template to arrange everything on the page.

  • Fields have to be assigned to an entity. – Kevin Apr 19 at 1:27
  • @Kevin—OK, can you say more? I currently have a custom content type, with all the fields I need added. Now I'm trying to have an entry function as a page (e.g., live at a specific, disallow adding additional entries of the same type). Any ideas? Thx! – Scott Thiessen Apr 19 at 17:12
0

Use the Empty Page module and create an empty page.

Just like node content types, you can create a custom block type in /admin/structure/block/block-content/types

Add fields to your block type, and then in /admin/structure/block/block-content create a block of your block type.

Place block in content region and for Visibility > Pages put the URL for your empty page, so the block is only visible at this page.

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.