Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DP-11651 address contact sidebar #565

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelogs/DP-11651.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

- (Patternlab) [details.twig] DP-11651: Added conditional rendering to hide the contact sidebar if only an address

___DESCRIPTION___
Added conditional rendering within the details.twig file to hide the contact sidebar if there is only an address available within the data in the groups array
- Created new page of how a page would look if only an address were given as contact information to a howto page
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,17 @@

<aside class="sidebar sidebar--colored">
{% if sidebar.contactList %}
{% set contactList = sidebar.contactList %}
{% include "@organisms/by-author/contact-list.twig" %}
{% set displayContactList = true %}
{% set contactListGroups = sidebar.contactList.contacts[0].groups %}
{# if there is only one item in the contacts list that is named Address,
then the contact list will not display in the sidebar #}
{% if contactListGroups|length == 1 and contactListGroups[0].name == 'Address' %}
{% set displayContactList = false %}
{% endif %}
{% if displayContactList %}
{% set contactList = sidebar.contactList %}
{% include "@organisms/by-author/contact-list.twig" %}
{% endif %}
{% endif %}
{% if sidebar %}
{% block sidebar %}
Expand Down
Loading