From c.robbenhaar@espresto.com Fri Apr 29 14:32:12 2016 From: Clemens Klein-Robbenhaar To: xwiki-users@xwiki.org Subject: Re: [xwiki-users] how to cover one page title Date: Fri, 29 Apr 2016 14:32:08 +0200 Message-ID: <57235448.5000508@espresto.com> In-Reply-To: <1461900115222-7599271.post@n2.nabble.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1409508543768269181==" --===============1409508543768269181== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable the HTML as shown in the browser is not the same as the document title (which you can indeed set with $doc.setTitle("...") ) Instead you can look in the file .../xwiki/skins/flamingo/htmlheader.vm where the html title is computed - look for the section starting with the com= ment "Compute the title" There you can see how the HTML title is computed, and indeed how the space pr= eferences are used to display a different HTML title and that it only reads space preferences. You can edit that file, or create a new skin as explained here: http://platf= orm.xwiki.org/xwiki/bin/view/DevGuide/Skins and edit a copy of it in your new custom skin. I guess in your use case the first step is to access the $doc variable in the= template and check if it is one of your special cases, and if it is, compute the $title differently. Side note: if you want to track down how XWiki renders a page, you can start = at skins/flamingo/view.vm and if a *.vm is included that does not exist in that skin, you can find it i= n the "templates" directory instead. ----- Urspr=C3=BCngliche Nachricht ----- Von: Jack Am: Friday, 29.04.2016, 05:21 An: Xwiki Users Betreff: [xwiki-users] how to cover one page title > the default title should be "$doc.web - $doc.name" > I hope cover one page title (as blog main page) ,I know that Space > Preferences make a different title for each space,but I just want to cover a > page title=20 > I try to use velocity code In the blog.Webhome as=EF=BC=9A >=20 > {{velocity}} > $doc.setTitle("My new title") > {{/velocity}} >=20 > it's not working >=20 > Is there any other way to cover a page title without modifying the database? >=20 >=20 >=20 >=20 > -- > View this message in context: http://xwiki.475771.n2.nabble.com/how-to-cove= r-one-page-title-tp7599271.html > Sent from the XWiki- Users mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users(a)xwiki.org > http://lists.xwiki.org/mailman/listinfo/users >=20 --===============1409508543768269181==--