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

Localized title in decorator not picked up by title-pattern #136

Closed
wweiss opened this issue Sep 26, 2016 · 4 comments
Closed

Localized title in decorator not picked up by title-pattern #136

wweiss opened this issue Sep 26, 2016 · 4 comments
Assignees
Labels

Comments

@wweiss
Copy link

wweiss commented Sep 26, 2016

Thymeleaf: 3.0.1.RELEASE
Dialect: 2.0.3

I have the following in my decorator:

<head>
  <title layout:title-pattern="$CONTENT_TITLE | $DECORATOR_TITLE" th:utext="#{head.title}">Layout</title>
</head>

and the follwing in my content page:

<head>
  <title th:utext="#{nav.home}">Home</title>
</head>

But, for instance, instead of getting the following for Spanish:
<title>Casa | Mi Lugar</title>

I get this:
<title>Home | Layout</title>

It would seem that the pattern is processed before the th:utext is parsed...

@wweiss
Copy link
Author

wweiss commented Sep 26, 2016

As a followup:

If I use th:text instead, it works fine. Interesting.

@ultraq
Copy link
Owner

ultraq commented Sep 27, 2016

Ah, I don't look for uses of th:utext in dynamic title creation, just th:text. Looks like that's a gap that needs to be filled!

@ultraq ultraq added the bug label Sep 27, 2016
@ultraq ultraq self-assigned this Sep 27, 2016
@ultraq
Copy link
Owner

ultraq commented Sep 28, 2016

Hi @billyboingo, I've uploaded a 2.0.4-SNAPSHOT version to the Maven snapshots repository which contains a fix to include th:utext/data-th-utext when looking for titles to use in the title pattern. Could you give that version a test to see if it works for you?

@wweiss
Copy link
Author

wweiss commented Sep 29, 2016

Hi @ultraq. Thanks for the quick response.
From my initial testing, this seems to have done the trick. Thanks!

@wweiss wweiss closed this as completed Sep 29, 2016
zhanhb added a commit to zhanhb/thymeleaf-layout-dialect that referenced this issue Sep 30, 2016
zhanhb added a commit to zhanhb/thymeleaf-layout-dialect that referenced this issue Sep 30, 2016
ultraq added a commit that referenced this issue Oct 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants