Update AboutUsPage team_members StreamField and template

Added a new 'website' field to the team_members StreamField in the AboutUsPage model. Updated the template to display the website link if provided, ensuring better flexibility for showcasing team member information.
main
Arne Schauf 10 months ago
parent 21a67afc27
commit fdbbb45298
  1. 19
      core/migrations/0019_alter_aboutuspage_team_members.py
  2. 1
      core/models.py
  3. 7
      core/templates/core/about_us_page.html

@ -0,0 +1,19 @@
# Generated by Django 5.2 on 2025-04-30 15:07
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0018_remove_homepage_slide1_headline_and_more'),
]
operations = [
migrations.AlterField(
model_name='aboutuspage',
name='team_members',
field=wagtail.fields.StreamField([('team_member', 6)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'max_length': 255}), 1: ('wagtail.images.blocks.ImageChooserBlock', (), {'required': False}), 2: ('wagtail.blocks.RichTextBlock', (), {'required': False}), 3: ('wagtail.blocks.EmailBlock', (), {'required': False}), 4: ('wagtail.blocks.CharBlock', (), {'max_length': 128, 'required': False}), 5: ('wagtail.blocks.URLBlock', (), {'required': False}), 6: ('wagtail.blocks.StructBlock', [[('name', 0), ('position', 0), ('photo', 1), ('bio', 2), ('email', 3), ('phone', 4), ('website', 5), ('linkedin', 5), ('xing', 5)]], {})}, null=True),
),
]

@ -534,6 +534,7 @@ class AboutUsPage(Page):
('bio', blocks.RichTextBlock(required=False)),
('email', blocks.EmailBlock(required=False)),
('phone', blocks.CharBlock(max_length=128, required=False)),
('website', blocks.URLBlock(required=False)),
('linkedin', blocks.URLBlock(required=False)),
('xing', blocks.URLBlock(required=False)),
])),

@ -289,6 +289,13 @@
</a>
</li>
{% endif %}
{% if block.value.website %}
<li>
<a href="{{ block.value.website }}" target="_blank" class="text-decoration-none text-dark">
<i class="bi bi-globe"></i> {{ block.value.website }}
</a>
</li>
{% endif %}
{% if block.value.linkedin %}
<li>
<a href="{{ block.value.linkedin }}" target="_blank" class="text-decoration-none text-dark">

Loading…
Cancel
Save