Thanks Vincent and Sergiu for the explanation.
+1
Thanks,
Marius
On 01/11/2011 04:53 PM, Sergiu Dumitriu wrote:
> On 01/11/2011 01:50 PM, Marius Dumitru Florea wrote:
>> On 01/10/2011 07:35 PM, Vincent Massol wrote:
>>> Hi devs,
>>>
>>> In lots of places we need to display the title without any markup
>>> rendering. Examples:
>>> - breadcrumb
>>> - activity stream
>>> - search results
>>> etc
>>>
>>> This is such a common use case I'm proposing to add a new API for it in
>>> Document: getPlainTitle()
>>> It's a one liner that will do:
>>>
>>> getRenderedTitle("plain/1.0")
>
> +1.
>
>> How would this be different than getTitle()? What does the plain text
>> rendered actually do?
>
> getTitle returns the content of the title field, which can be empty.
> getDisplayTitle computes a title by looking in the title field, the
> first heading in the content, or the document name if all else fails,
> then renders it as xhtml/1.0. getPlainTitle would do the same search,
> but it will render it as plain/1.0, which means that all markup will be
> removed, leaving only the relevant text.
>
>> Thanks,
>> Marius
>>
>>>
>>> Here's my +1
>>>
>>> Thanks
>>> -Vincent
>
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs