Jump to content

Topic on Extension talk:Display Title

Use with Cargo

6
Summary by Cindy.cicalese

Noted requirement of MediaWiki 1.27 or later.

86.165.114.90 (talkcontribs)

Hi Cindy

Thank you for continuing to develop and maintain the ability to have an alternative to page names. I'm a little unsure if I can use this extension instead of semantic title when wanting to set the display title to the value of a cargo field. If I can, does this have any drawbacks over the use of semantic title?

Many thanks

Duncan, Nov 16th 2016

Cindy.cicalese (talkcontribs)

Hi, Duncan.

The short answer is: yes, you can use DisplayTitle with Cargo. The full answer requires a bit more explanation. The DisplayTitle extensions does not care how the displaytitle page property gets set. It just uses that value to replace the page title with the display title when rendering links to pages, etc. The setting of the displaytitle page property can be done with the DISPLAYTITLE magic word provided by MediaWiki core OR by the SemanticTitle extension. SemanticTitle will set the displaytitle page property with either a Cargo field OR a Semantic MediaWiki property. I recommend using DISPLAYTITLE if possible, since sometimes SemanticTitle requires an additional null edit or purge of a page before the new display title shows up. But, if using a Cargo field is more convenient, it is definitely still an option. In that case, you would use both DisplayTitle (for rendering) and SemanticTitle (for setting).

Cindy

86.165.114.90 (talkcontribs)

Thanks Cindy, that's really helpful. I'm currently using a version of MW prior to 1.27 so am I right in thinking I need to upgrade to a later version for Display Title to work?

Many thanks

Duncan, 16th December 2016

Cindy.cicalese (talkcontribs)

Unfortunately, yes, you will need to upgrade to MW 1.27 or later.

Fehlerx (talkcontribs)

For anyone struggling to set the display title to the value of a cargo field: adding the option "|no html" to the #cargo_query call, as suggested by Yaron worked for me.

Cindy.cicalese (talkcontribs)

Thank you for the information!

Reply to "Use with Cargo"