I am using {{ page.content }} to print all my page content. It is printing my all content but I want to remove title from this content and print it separately in different div structure (without using page.content). Currently its taking drupal default structure. Is it possible?
-
Page title is a block that can be managed from Blocks layout and you disable it/ remove it from there– Hodba KhalafJun 1, 2020 at 15:29
-
How? from where?– shreyas dhokteJun 1, 2020 at 16:37
-
Does this answer your question? How do you display the 'Title' field on display/page for custom content type?– leymannxJun 1, 2020 at 21:27
1 Answer
as @Hodba Khalaf mentioned in comment Page title is a block go to admin/structure/block a block called Page title added by core
But you can render page content without specific field in twig by using without filter
for example you can render page content without page title try something like:
{{ page.content|without('bartik_page_title') }}
Note : in the example above page title block element is bartik_page_title
because i use bartik theme so it could be different in your case, dump the page.content to get the key of your title page.