Skip to content

Fix title for schedule pages #340

@fhemberger

Description

@fhemberger

I noticed this issue as I was bookmarking a couple of interesting talks during the last congress:

There's no distinction in the page's title attribute on schedule pages. I came up with a quick fix at least for the public event detail pages in the template itself:

-    %title= title
+    - title_fragments = []
+    - event = @view_model.event if @view_model
+    - if event
+      - event_type = t "options.#{event.event_type.present? ? event.event_type : 'other' }"
+      - title_fragments.push "#{event_type.capitalize}: #{event.title}"
+      - if @conference.days.length > 1
+        - title_fragments.push event.start_time.strftime("%A")
+    - title_fragments.push title
+    %title= title_fragments.join ' | '

This will give you titles like

Meeting: Recalled to Life | Wednesday | Schedule Azrael Machine Conference
Workshop: From Here to Eternity | Wednesday | Schedule Azrael Machine Conference

which are much more expressive, but I think other schedule pages should be treated the same way. Since I'm no Rails expert, I don't know where the best place is to handle such a general approach, so I'm leaving this issue here for discussion.

This will also improve search engines results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions