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

Seo friendlyurls #521

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Seo friendlyurls #521

wants to merge 3 commits into from

Conversation

wgilling
Copy link
Contributor

@wgilling wgilling commented Oct 4, 2021

This feature branch includes minor adjustments to links in several of the templates/content twig files (so that they can still be routed to the handler) as well as an update to the pathauto configurations for items, collections, and several taxonomies (Corporate bodies, Events (Conference), and Persons (Family, Person)).

Import the following configuration files and clear the cache. Additionally, the sitemap file can be purged at this time - to confirm that the new sitemap's urls would be the friendly urls.

Import the config/sync files

pathauto.pattern.collections.yml
pathauto.pattern.collections_nids.yml
pathauto.pattern.corporate_bodies.yml
pathauto.pattern.events_conference_.yml
pathauto.pattern.items.yml, 
pathauto.pattern.items_nids.yml
pathauto.pattern.persons.yml 

To purge the previous sitemap file, drush sql-query "truncate table simple_sitemap;"

The new pathauto patterns use the tokens:

  • Collections | /collections/[node:title]
  • Items | /items/[node:title]
  • Corporate bodies | /corporate bodies/[term:name]
  • Events (Conference) | /events/[term:name]
  • Persons (Family, Person) | /people/[term:name]

While the previous patterns should stay intact (while the system prefers the above patterns, it will still handle these routes):

  • Collections nids | /collections/[node:nid]
  • Items nids | /items/[node:nid]

While the agent links are all set to a pre-canned search GET url for that agent, these entities do still have core Drupal routes set up for them such as http://localhost:8000/people/pannabecker-virginia - which were previously set up with default route that looks like this: http://localhost:8000/taxonomy/term/54. We may want to add these core paths to the sitemap.

Look for ./view, ./metadata links on image, digital document item pages. Look for ./members on complex object parent item pages. Look for ./metadata on all other item pages. Additionally, test that the routes for a collection and an item still work when using the [node:nid] route.

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 this pull request may close these issues.

2 participants