Marikina, Metro Manila, Philippines
Tel: (+63 2) 7625-6994 | (+63 2) 8632-1748
Mobile: (+63 2) 945 217-3344
Marikina, Metro Manila, Philippines
Tel: (+63 2) 7625-6994 | (+63 2) 8632-1748
Mobile: (+63 2) 945 217-3344
I have a Content Type called a Full Page, which can accommodate paragraphs of views, custom, and all sorts of blocks for layout flexibility
The issue is we seem to do not have a way or any available feature both from the Metatag modules nor Paragraph module to easily insert meta tags in a straight-forward way
Created a Paragraph Type, called it Metatag Block, included a field type called e.g. Metatag Block Text, text long
Edited the Content Type where I have the Paragraphs as Entity References, updated it to the new paragraph type Metatag Block, saved
Going back to a Full Page content item, I can now insert a Metatag Block which has a field for a text, goodie to control the length of the meta description for example.
The problem is I do not seem to have a way to hide that from the public/source display since it is part of the paragraphs field. CSS display none to hide the field can be used.
Another problem is, I thought going back to the Metatag module settings, I can add the tags assigned to a token for the paragraph metatag block but the token list is not showing anything, got stuck here. There seems to be a module for this https://www.drupal.org/project/paragraphs_summary_token, but could not seem to figure out how this works and helps.
Got the same content type: Full Page, with the same content items for this. Since I do not seem to have a use for the node's default Body field, and since I am heavily using paragraph blocks for both content and layout, resorted to using the body field as a placeholder for the meta tag description. In manage display, set this to hidden so it will not display publicly.
Going back to the Metatag module settings, I created a setting for the content type, and assigned the body token to the basic meta tags, OG tags, etc.
Done. Whew! This is Drupal on a good day @@
Leave a Comment
All fields with * are required.