On Sat, Nov 14, 2009 at 7:38 AM, Vicent Mas wrote: > On 2009-11-13 Vicent Mas said: > >> Hi all, >> >> I'm trying to fine tunning my dispatcher website. One thing that I find >> particularly annoying is the fact that regular processing of a xdoc >>  fragment like: >> >> >> >>  
>>     My title >>  
>>   >> ... >> >> will produce an HTML page like: >> >> >>   >>     My title >>   >>   >>    
>>      

My title

>> ... >> >> so the *same* title will appear in the title bar of the browser window and >>  in the body of the html page.  In addition, this title is used for search >>  engines like google when the result of a search is shown. But the body >>  title string normally is not meaningful when displayed as a result of a >>  search or when displayed in the title bar of the web browser. So I'd like >>  to know how to specify different titles for the HTML head and the HTML >>  body. Is ther a direct way for doing it with Forrest? Or have I to do some >>  hacking? >> >> Thanks in advance. >> >> Vicent > > Hi again, > > I've been playing around with contracts that seem related to the subject > (namely content-title.ft and title.ft) but I cannot figure out how to do what I > want in an easy way. > > Also I've found a new problem (although it doesn't affect me right now): the > content-title.ft contract description says it deal with subtitles but I don't > see the code for doing it. In fact I've not succeeded using subtitles in my > xdocs: using a subtitle element inside a header element produces no output at > all. > > Any ideas? Help will be appreciated. Hi Vincent, I haven't poked around with dispatcher in a long time and don't remember the preferred way of modifying contracts, but it looks like your on the right track with the content-title contract. That contract appears to output a title in two locations (the two forrest:part elements), you're happy with one, but not the other. It's been a while, so this may not be correct, but you might try... o) Overriding the content-title contract in your local project, removing the undesired output part. o) Finding the right contract to override to output the title in a new location (override that contract, find the right params to pass in, etc.) If I've gone wildly astray, hopefully Thorsten will come in and save you:) --tim