-
Notifications
You must be signed in to change notification settings - Fork 153
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
Subpage titles are missing in title tag #2367
Comments
Can I assign this ticket to you @gvn 😉 😆 |
Turns out this is still an issue - we should probably get that fixed sooner than later =) |
I am getting started with Open Source and I'd like to work on this issue. Can I? |
Hi @Dhrumilcse, absolutely - have you worked with Wagtail (or Django) and React before? |
Thanks @Pomax, |
That's correct, except each of the top level pages has their own template in https://github.com/mozilla/foundation.mozilla.org/tree/master/network-api/networkapi/wagtailpages/templates/wagtailpages/static that each needs to specify a new title. If you look at https://github.com/mozilla/foundation.mozilla.org/blob/master/network-api/networkapi/templates/pages/base.html you can see that https://github.com/mozilla/foundation.mozilla.org/blob/master/network-api/networkapi/templates/pages/base.html#L15 already provisions a block called |
Thanks @Pomax |
I've added the label to "assigned to contributor", as only people who are part of the github org can be "assigned" to issues. |
Hello team, I need guidance. Because the foundation website contains a lot of modular code and Django's model-view-template pattern, it was a little difficult for me to reverse engineer it and find the solution. Therefore, I decided to create a small Django project and app on my local machine and run a case same as our issue. I found the solution on the local project. Here is my solution, briefly. In the views.py file of the application, while defining the function for specific pages, we pass the 'template tag' with its definition (in our case, the subpage title) as an argument in the render function. Please find the images containing code of the fix and the desired output. So, once I got this, I went straight ahead to resolve the issue in the main project but couldn't find the file (views.py, I guess) to fix the issue. Can you tell me how should I fix this or if I am incorrect in any way, will you please guide me to the correct one? |
It looks like this is working on Opportunity and Campaign pages, because the page editor gets to set the "title" property of the page on those templates. Two relevant lines of code: It seems like the main thing we need is for unique page templates to set a title in their model, and the base template should pick it up. |
Repro: Go to any subpage and look at the title. It shows
Mozilla Foundation -
.Expected: Add the subpage title after the hyphen.
The text was updated successfully, but these errors were encountered: