For the content type's City reference field, you should be able to configure under "Manage display" select under "Format" from "Label" to select "Rendered Entity" then click the gear icon then for "View Mode" select "Name-Summary".
You would then have a content entity that would output something like the following:
<h1>Test Content About Buenos Aires</h1>
<div>
<h2>body</h2>
<p>The body of this content would be here and relate to Buenos Aires.</p>
<h2>City</h2>
<div>Buenos Aires</div>
<h2>Country</h2>
<div>Argentina</div>
<h2>Continents</h2>
<div>South America</div>
</div>
Theme in Twig
For a twig template, you need the site may need to load reference fields differently like the Continent field (the Country's custom reference field) on a City term. Try the following in your twig template:
{{ content.field_REF_CITY.entity.field_REF_COUNTRY.entity.title }}
See https://drupal.stackexchange.com/questions/144947/how-do-i-access-a-fiel...
Have you included Twig Tweak?
Twig Tweak https://www.drupal.org/docs/contributed-modules/twig-tweak-2x/cheat-sheet β
Various Designs
Please note that there are various ways to design a system for categorizing by location. One implementation, is the taxonomy_place module β that nests terms by country, state/province and city.
One way to quickly create this functionality is through the Administration area of Drupal for each of the Taxonomy Vocabularies:
- Step one navigate to Administration -> Structure -> Taxonomy -> *VocabularyName* -> Manage Display
- Set the reference field's Format to "Rendered Entity". SCREENSHOT
- Set the reference field's view mode to "Default" ... for now. SCREENSHOT
- Go to Administration -> Structure -> Display Modes -> View modes
- Scroll to Taxonomy term
- Click "Add view mode for Taxonomy term"
- A dialog window will appear with fields for Name, Description and checkboxes for which Taxonomy term types to activate this view mode.
- In the "Name" field enter "Name-Summary"
- Skip "Description"
- Check the Taxonomy term types
- Navigate to the Vocabulary "City" then to "Manage Display".
- Click on a new sub tab for "Name-Summary"
- Move the "Country" field above the "Description" field
- Change the "Country" field's Format to "Rendered Entity"
- Change the "Country" field's View mode to "Name-Summary"
- x
It's due to the versions of included square having a range of PHP requirements. Please see issue #3338931 "Update square/square dependency in order to support PHP 8.2" π Update square/square dependency in order to support PHP 8.2 Fixed
This works on the latest dev at 8.x-3.x-dev from 29 Mar 2023.
Kevin it's a good start! This worked for the blocks but any sections with context do not seem to follow any context rules now.
Messed with Pre_Render
In /src/Utility/Visibility.php, I replaced $build['content']['#access'] = FALSE with $build['#pre_render']['#printed'] = TRUE but elements are still rendering. Maybe something else is in the pre_render array?
Stuff that I've been reading
Render Arrays section of the Render API docs β
Code Blocks.php ContextReaction - Context
GreenSkunk β created an issue.
GreenSkunk β created an issue.
While you can't set a specific number as a breakpoint, you can select from the presets at Appearance -> Bootstrap Barrio Subtheme -> Components -> Navbar Structure -> Navbar Toggle Size
See
Please note that when adding/creating a "Default meta tags" type you will not see all of the token options until after you have saved and then edit the new type.
Steps to View Tokens in Metatags
Step 1: Go to the Metatag configuration
Metatag configuration page Administration -> Configuration -> Search and Metadata -> Metatag
Step 2: Add a Default Meta Tags Type
From the Metatag configuration you may begin to create a new default metatag type by clicking the button "Add Default Meta Tags".
Step 3: Select Type
At this point, you are selecting an entity bundle that you would like to set default meta tags for. Important Note: You will only see global tokens. You will NOT see tokens for fields. I do not recommend setting defaults for an entity bundle at this point.
Step 4: Save
Click the "Save" button.
Step 5: Edit the New Metatag Type
Click Edit for the newly-created Metatag Type.
You will now see tokens for the fields related to this entity bundle/type that you may set for the various meta tags.
References
The documentation page
Standard Usage Scenario β
states
"To adjust metatags for a specific entity, the Metatag field must be added first"