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

[Feature Request] improve SEO with subheading with search terms in #111

Open
djay opened this issue Nov 4, 2020 · 5 comments · May be fixed by #120
Open

[Feature Request] improve SEO with subheading with search terms in #111

djay opened this issue Nov 4, 2020 · 5 comments · May be fixed by #120
Assignees

Comments

@djay
Copy link
Member

djay commented Nov 4, 2020

Problem

The Collection title is static. Having a prominent text on the page for each unique set of results can increase SEO in cases where you have static links to various collections results pages that are mentioned the keywords users are likely to be searching for in google etc.

How it will work

Portlet you can have a div with something like

  • "Your search for Language: Arabic, Category: Covid, has returned 5 results".
  • Topic "Aged" in Bengali - total 6 documents
  • Search returned 356 results
  • Search for "covid", filtered "Arabic" Language and "PDF" Media Type
  • No results were returned for search "something Type:PDF Language:Arabic".

needs to

  • be easy so several predefined options available (and perhaps translated)
  • But should be able to be customised to make a more natural sounding title, or improve SEO.
  • able to be themed so it can replace the title or be a subtitle
  • should be able to be controlled in a way that it only works for certain important filters?

Proposed UI

This UI is actually tries to make this portlet work for 4 different use cases

  1. Title or textual description of current search
  2. customisatble text when there are no search results
  3. widget to remove selected filters on current search
    • Screen Shot 2021-09-15 at 1 36 53 pm
  4. widget to display information on the current content and allow it to be searched (i.e. replace plones "filed under" viewlet)
    • Screen Shot 2021-09-15 at 1 46 00 pm

We won't inspect portlets to see what has been set as filters. too hard. So UI can't use actual examples based on a real search.

  • In and out widget (sortable multiple choice) to mix and match the following
    • [Your search for]
    • [ - ]
    • [, ]
    • [{Filter}: {value}, ...]
    • [{value}, ...]
    • ["{value}" {filter}, ...]
    • [has returned]
    • [X results]
    • and description mentioning to use registry to add additional templates using TAL if needed. Maybe only visible to managers?
  • Hide when (multiple selection)
    • no results
    • results
    • no filters
    • some filtes
    • X filter present
    • search present
    • no search
  • Header tag level
    • only if using mosaic because it doesn't make sense to have a header inside a portlet most likely?
  • Click Action
    • remove filter
    • replace filters
    • not clickable
  • Display Info from
    • Current Search
    • Current Content

Hide when would allow you to only display the portlet for certain sets of filters. and also allow multiple sets of filters to be on different areas of the screen. for example, number of results could be seperate from filters set.

TODO:

  • how to have a template part not appear when its not relevant?
    • e.g. "for" should not appear when there are no filters.
    • just use the hidewhen to have many versions?

Alternatives/additions considered

  • Could combined "Display Info from" and "Clock Action" into a single selection of "Widget Type"
    • since it probably doesn't make much sense to click to remove filters when displaying tags on content for example. It might lead people to think they are removing the tag?
  • make it easier to have a title or subtitle without diazo
    • could be possible to use a below title viewlet and have an option to render there instead of the normal portlet location. even though it would still be configured via a portlet. may or may not be able to update it dynamically via the pattern.
    • can't think of a good way to actually change the title itself.
      • replace collection view template with custom one?
      • monkey patch on collections title attribute?
      • use contentwellportlets or similar so get more options for placement.
      • use mosaic?
@djay djay self-assigned this Feb 3, 2021
@djay djay linked a pull request Mar 19, 2021 that will close this issue
@djay
Copy link
Member Author

djay commented Mar 23, 2021

In terms of SEO being able to replace a title or have a subtitle would be better than a portlet.

  • probably have to be done via diazo
    • will it still update via pattern or have to switch off?
  • could be possible to use a below title viewlet and have an option to render there instead of the normal portlet location. even though it would still be configured via a portlet.
    • may or may not be able to update it dynamically via the pattern.
  • can't think of a way to actually change the title itself.
    • replace collection view template with custom one?
    • monkey patch on collections title attribute?
  • use contentwellportlets or similar so get more options for placement.
  • use mosaic.

@djay
Copy link
Member Author

djay commented Mar 25, 2021

I think I will leave it to using diazo if you need it as a header tag and want it at the top of the page.
Also, I think rather than expose a TAL field in the settings, I won't offer a custom template at this stage. but instead it would be better to offer a way via the registry to add your own templates to the list. The reasoning is that a given template wording might not be very specific to a given search page and exposing end users to TAL is not great.
@petschki have you had a chance to look at these requirements?

@thet
Copy link
Member

thet commented May 27, 2021

A summary tile/portlet would be a nice thing.
A textual summary could also be displayed in each individual filter portlet.

I'd not handle any integration related with Diazo, ContentWellPortlets or Mosaic here. These are integration problems which are better solved in "policy" or theme packages.
However, documentation which Diazo rules can be used or how to solve a problem with ContentWellPortlets or Mosaic would of course be good and totally within the scope of this package.

Regarding accessing the applied queries/filters: they are written to the request. It should be possible to access them via

from zope.globalrequest import getRequest

filters = getRequest("contentFilter")

@djay
Copy link
Member Author

djay commented May 27, 2021

I'd not handle any integration related with Diazo, ContentWellPortlets or Mosaic here. These are integration problems which are better solved in "policy" or theme packages.

My thoughts currently is that the tile version would have some kind of "as header" option since its possible to replace the header tile with this without any theming. But the portlet version won't.

A textual summary could also be displayed in each individual filter portlet.

Maybe. But not how it's going to be implemented in this PR #120. You can have seperate portlets with conditions just for specific filters.

@djay
Copy link
Member Author

djay commented May 27, 2021

I'm also considering extending this later with "topic field" enhancement

  • Links on the values (which will reduce the filters to just this value, ie reset all the other filters)
  • search from context object values.
    • If the current object has a value that matches an index then display this (along with the link) so that the user can search for similar objects
    • will need a blacklist to prevent some fields being displayed (like title). ideally would use the list of filter portlets on the collection but that's too hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants