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] Introduce NavigationTitle #871

Merged
merged 4 commits into from
May 6, 2024
Merged

[FEATURE] Introduce NavigationTitle #871

merged 4 commits into from
May 6, 2024

Conversation

linawolf
Copy link
Contributor

@linawolf linawolf commented Feb 26, 2024

In TYPO3 we often have the problem, that longer titles are required for search engines, our internal search and for ppl coming from by direkt link out of context. However long titles clutter up the menues and cause a lot of repetition there.

So we would like to be able to give Documents a short title for the Menu and a longer one to display in place.

This is not a sphinx feature, it is however hard to impossible to do in a theme

@linawolf linawolf marked this pull request as draft February 26, 2024 07:35
@linawolf linawolf force-pushed the task/navigationTitle branch 3 times, most recently from ed5812c to 86a19e1 Compare March 23, 2024 10:18
@linawolf linawolf marked this pull request as ready for review March 23, 2024 10:20
@linawolf linawolf self-assigned this Mar 23, 2024
@linawolf linawolf requested a review from jaapio March 23, 2024 10:20
@linawolf linawolf force-pushed the task/navigationTitle branch from 2d1c796 to 7ed6814 Compare March 24, 2024 11:00
@jaapio
Copy link
Member

jaapio commented Mar 26, 2024

In some spots this feels like a dirty hack, I see that you are using a field to set the alternative navigation title. That looks good. what feels wrong is that we need an extra option in the DocumentEntry. I would expect the same approach as for the breadcrumbs where you chose on rendering the different title. I think we should do the same for menu's.

The document node should not be aware of the existing extra title. Maybe we should have an extra map where you can do the title lookup to make it easier. we could build that map during the compilingpass and use that during the rendering phase.

I hope this makes sense? Let's discuss the details if you want to know more.

@linawolf linawolf force-pushed the task/navigationTitle branch from 7ed6814 to 7357983 Compare April 18, 2024 07:29
@linawolf linawolf force-pushed the task/navigationTitle branch from 7357983 to 1b7eab2 Compare April 18, 2024 07:30
@linawolf
Copy link
Contributor Author

@jaapio how would you feel about this solution, where I keep the data in a map and make it extendable by event?

@linawolf linawolf merged commit caa17bf into main May 6, 2024
40 checks passed
@linawolf linawolf deleted the task/navigationTitle branch May 6, 2024 19:21
@phpdoc-bot
Copy link

💔 All backports failed

Status Branch Result
1.x Backport failed because of merge conflicts

You might need to backport the following PRs to 1.x:
- [FEATURE] Introduce NavigationTitle
- [FEATURE] Introduce directives for bootstrap cards
- [FEATURE] Introduce directives for bootstrap accordions
- Merge pull request #972 from phpDocumentor/fix/extendable-compiler-context
- Add deprecation trigger for context extension
- Introduce CompilerContextInterface
- Merge pull request #978 from phpDocumentor/task/catch-transport-excepions

Manual backport

To create the backport manually run:

backport --pr 871

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

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

Successfully merging this pull request may close these issues.

3 participants