Jump to content

Components: Difference between revisions

From Swarthmore Knowledge Base
Imported from Confluence
 
Kwhiteb1 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
A component is specialized module that can be added to one of three specialized webpage content zones . There are a variety of component types. Each behaves differently, wants different information from the editor, and displays differently depending on the type.
{{DrupalBack}}
A '''component''' is a reusable content module that can be added to a webpage. Components provide functionality beyond the standard body content, such as feature blocks, galleries, accordions, call-to-actions, and other specialized content. Each component has its own settings and displays differently depending on the component type.


== 4.1 4.Understanding Content Zones ==
== 4.1 Understanding Content Zones ==


The Drupal page templates are several zones for different types of content. Adding a component to a page is done in three specific content zones:
Drupal page templates contain three content zones where components can be placed:


* '''3/4 Width Page Content''' - is specifically for components. Any component added to this zone will appear below the body copy block and always to the right of the navigation column. The maximum width is same dimension as the body content zone above it.
* '''3/4 Width Page Content''' — Reserved for components. Components added to this zone appear below the body content and to the right of the navigation menu. This zone is the same width as the body content above it.
* '''Full Width Page Content''' - is specifically for components. Any component added to this zone will appear below the body copy, navigation, and 3/4 with page content. It will utilize the full width of the browser window (if available) to fill 100% of the width.
* '''Full Width Page Content''' — Reserved for components. Components added here appear below the body content, navigation, and 3/4 Width Page Content. They span the full width of the page.
* '''Shared Site Content '''- is specifically for components. It is a special zone that is managed through Site Settings. Any component added to this zone will appear on all teh pages of the your website below all the other zones.
* '''Shared Site Content''' — Reserved for components managed through '''Site Settings'''. Components placed in this zone appear on every page of the website, below all other content zones.


[[File:zones1.png|541px|alt=zones1.png]]
{{Screenshot|zones1.png|541px|Screenshot showing the three component content zones available within a Drupal page.|Drupal pages contain three content zones where components can be added.}}


== 4.2 Adding Components ==
== 4.2 Adding Components ==


To add a new component to a page, first goto the page and click '''Edit Page'''. In the editor, scroll below the body content and you will see the '''3/4 width page content''' and '''full width page''' content zones.
To add a component to a page, first navigate to the page and click '''Edit Page'''. Scroll below the body content to locate the '''3/4 Width Page Content''' and '''Full Width Page Content''' zones.


[[File:zones2.png|526px|alt=zones2.png]]
{{Screenshot|zones2.png|526px|Screenshot showing the component content zones within the page editor.|The component zones appear below the body content in the page editor.}}
If a component already exists in one of the zones, it will appear here. In the example above, there are no components present in the 3/4 width content zone, and there is one feature link list component (Watch Bio Majors Abroad) in the full width content zone.
 
If a component already exists in one of the zones, it will appear there. In the example above, there are no components in the '''3/4 Width Page Content''' zone and one Feature Link List component in the '''Full Width Page Content''' zone.


=== 4.2.1 Adding a New Component ===
=== 4.2.1 Adding a New Component ===


To add a new component to a particular zone, click the drop down menu. A list of the available components will appear. You can then select the component you wish to add.
To add a component to a content zone, click the '''Add Component''' drop-down menu. A list of available component types will appear. Select the component you wish to add.
 
{{Callout|type=tip|Some components are designed to work only in the '''Full Width Page Content''' zone and therefore only appear in that menu.}}
 
{{Screenshot|zones3.png|418px|Screenshot showing the Add Component menu for the 3/4 Width Page Content zone.|The available components vary by content zone.}}


{{Card|variant=info|title=Info|content=Note: Certain components only work in the full width page content zone so they only appear in that drop down.}}
{{Screenshot|zones4.png|418px|Screenshot showing the Add Component menu for the Full Width Page Content zone.|Some components are available only in the Full Width Page Content zone.}}
[[File:zones3.png|418px|alt=zones3.png]][[File:zones4.png|418px|alt=zones4.png]]


=== 4.2.2 Create the Component ===
=== 4.2.2 Create the Component ===


For example, after selecting “Add Feature” to the Full Width Page Content Zone, the editor will add a new blank component. Simply enter in the required information into the component and click Save.
After selecting a component—for example, '''Add Feature''' in the '''Full Width Page Content''' zone—a new blank component will be added to the page. Complete the required fields and click '''Save'''.
 
{{Callout|type=tip|Each component requires different information. Refer to the documentation for each component type for field-specific instructions.}}


{{Card|variant=info|title=Info|content=Every component wants different information. You can learn more about the different component types by clicking on any of them in the left menu.}}
{{Screenshot|zone5.png|418px|Screenshot showing a newly added blank Feature component.|A new component is added to the page after it is selected.}}
[[File:zone5.png|418px|alt=zone5.png]][[File:zone6.png|418px|alt=zone6.png]]
 
{{Screenshot|zone6.png|418px|Screenshot showing the completed Feature component ready to be saved.|Complete the required fields before saving the component.}}


== 4.3 Arranging Components ==
== 4.3 Arranging Components ==


You change the sort order of the components by clicking the the six dots and dragging and dropping it to the correct vertical position.
You can change the order of components by clicking and dragging the six-dot handle to the desired position within the content zone.


{{Card|variant=info|title=Info|content=Note: You can only drag and drop components within their zone. You cannot drag and drop them to a different zone.}}
{{Callout|type=tip|Components can only be reordered within their current content zone. They cannot be dragged from one content zone to another.}}
[[File:zone10.png|872px|alt=zone10.png]]
 
{{Screenshot|zone10.png|872px|Screenshot showing the drag handle used to reorder components.|Drag the six-dot handle to change the order of components within a content zone.}}


== 4.4 Editing an Existing Component ==
== 4.4 Editing an Existing Component ==


Once a component is on a webpage, you can edit it in one of two ways.
Once a component has been added to a page, it can be edited in one of two ways:


# You can click the Edit button<br>
# Click the '''Edit''' button on the component.
[[File:comp_edit.png|526px|alt=comp_edit.png]]
# You can use the in-context editor icons that appear in the upper right corner of every component


[[File:in_context.png|1106px|alt=in_context.png]]
{{Screenshot|comp_edit.png|526px|Screenshot showing the Edit button for a component.|Use the Edit button to modify an existing component.}}
 
# Use the contextual editing icons that appear in the upper-right corner of each component when contextual links are enabled.
 
{{Screenshot|in_context.png|1106px|Screenshot showing the contextual editing icons available on components.|Contextual editing provides quick access to component editing directly from the page.}}


== 4.5 Removing Components ==
== 4.5 Removing Components ==


To remove a component from a page, click the trash icon.
To remove a component from a page, click the '''Trash''' icon associated with that component.
 
[[File:trash.png|692px|alt=trash.png]]


{{Screenshot|trash.png|692px|Screenshot showing the Trash button used to remove a component.|Select the Trash button to remove a component from the page.}}


[[Category:Drupal]]
[[Category:Drupal]]
<!-- Imported from Confluence page id=181862405 (https://swatkb.atlassian.net/wiki/spaces/DRUP/pages/181862405/Components) -->

Latest revision as of 19:06, 9 July 2026

A component is a reusable content module that can be added to a webpage. Components provide functionality beyond the standard body content, such as feature blocks, galleries, accordions, call-to-actions, and other specialized content. Each component has its own settings and displays differently depending on the component type.

4.1 Understanding Content Zones

Drupal page templates contain three content zones where components can be placed:

  • 3/4 Width Page Content — Reserved for components. Components added to this zone appear below the body content and to the right of the navigation menu. This zone is the same width as the body content above it.
  • Full Width Page Content — Reserved for components. Components added here appear below the body content, navigation, and 3/4 Width Page Content. They span the full width of the page.
  • Shared Site Content — Reserved for components managed through Site Settings. Components placed in this zone appear on every page of the website, below all other content zones.
Screenshot showing the three component content zones available within a Drupal page.
Figure: Drupal pages contain three content zones where components can be added.

4.2 Adding Components

To add a component to a page, first navigate to the page and click Edit Page. Scroll below the body content to locate the 3/4 Width Page Content and Full Width Page Content zones.

Screenshot showing the component content zones within the page editor.
Figure: The component zones appear below the body content in the page editor.

If a component already exists in one of the zones, it will appear there. In the example above, there are no components in the 3/4 Width Page Content zone and one Feature Link List component in the Full Width Page Content zone.

4.2.1 Adding a New Component

To add a component to a content zone, click the Add Component drop-down menu. A list of available component types will appear. Select the component you wish to add.

Tip
Some components are designed to work only in the Full Width Page Content zone and therefore only appear in that menu.


Screenshot showing the Add Component menu for the 3/4 Width Page Content zone.
Figure: The available components vary by content zone.
Screenshot showing the Add Component menu for the Full Width Page Content zone.
Figure: Some components are available only in the Full Width Page Content zone.

4.2.2 Create the Component

After selecting a component—for example, Add Feature in the Full Width Page Content zone—a new blank component will be added to the page. Complete the required fields and click Save.

Tip
Each component requires different information. Refer to the documentation for each component type for field-specific instructions.


Screenshot showing a newly added blank Feature component.
Figure: A new component is added to the page after it is selected.
Screenshot showing the completed Feature component ready to be saved.
Figure: Complete the required fields before saving the component.

4.3 Arranging Components

You can change the order of components by clicking and dragging the six-dot handle to the desired position within the content zone.

Tip
Components can only be reordered within their current content zone. They cannot be dragged from one content zone to another.


Screenshot showing the drag handle used to reorder components.
Figure: Drag the six-dot handle to change the order of components within a content zone.

4.4 Editing an Existing Component

Once a component has been added to a page, it can be edited in one of two ways:

  1. Click the Edit button on the component.
Screenshot showing the Edit button for a component.
Figure: Use the Edit button to modify an existing component.
  1. Use the contextual editing icons that appear in the upper-right corner of each component when contextual links are enabled.
Screenshot showing the contextual editing icons available on components.
Figure: Contextual editing provides quick access to component editing directly from the page.

4.5 Removing Components

To remove a component from a page, click the Trash icon associated with that component.

Screenshot showing the Trash button used to remove a component.
Figure: Select the Trash button to remove a component from the page.