Open aradalvand opened 3 years ago
@AradAral
Thank you for your interesting proposal!
However, what you want to do can be implemented without changing this library easily, I think.
I wrote a sample code (Please see the following URL).
Of course, this proposal is very interesting. I can implement the feature that you suggested.
But I have to consider this suggestion well to keep simplify of this library. Unfortunately, so I have some projects those wait to fix bugs by me, I can not start to consideration or implementation about this suggestion immediately.
Don't forget that you can create your own custom Title
component derived from this library, and I'll welcome it.
@jsakamoto Hi! Thanks for your response. I get your point, and you're right, I like your demonstration of how it can be done by the developer, I also like the idea of having your custom wrapper component, so I guess I'll probably do it that way. Thank you. Feel free to close this issue if you decide that this is better not implemented as part of the library. I understand your situation. Have a great day!
It happens fairly often where you want the titles across all the pages in your website to have a shared pattern. For instance, no matter what page you're on in Stack Overflow, the title always ends with " - Stack Overflow".
It would be nice if this library provides a feature that allows users to achieve this, it would make it even more superior than it already is to Microsoft's built-in
<Title>
component.I propose a property gets added to
HeadElementHelperServiceOptions
, so that you could do the following:Or something similar. Without this, we currently have to repeat the suffix on every page: (Products.razor)
That way, this would suffice:
Nicer, and cleaner.
There could also be a parameter for the
<Title>
component with which you can specify not to use the suffix, this is useful when for example you have a page whose title you want to be unique: