You can normally use wicket in the <head> or <wicket:head> sections.

I use this approach to set my page favicon (which is the <link> tag).

It should also work for the <title> tag.

e.g. put a wicket:id into the title tag in the head section of the base page:

<html>
<head>
<title wicket:id="title"></title>
</head>
<body>
<wicket:child/>
</body>
</html>

And then in your BasePage:

onInitialize() {

    add (new Label("title", provideTitleModel());

}

/**
 * Let the concrete child classes provide the content for the title.
 */
protected abstract IModel<String>provideTitleModel();

Regards,

Mike
Hi I don't know the best way to make title of page depends on subpage.

I have a BasePage with a header, footer, etc. My concrete pages extends from
BasePage. Then I want to have different title on each page.

What do you recomend?

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to