We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Nicer Wiki Titles (an extension to allow correctly capitalized and punctuated article titles)

Development and Programming

Michael Rog's avatar
Michael Rog
179 posts
15 years ago
Michael Rog's avatar Michael Rog

The Problem with Wiki Titles

The EE Wiki Module displays article titles as taken directly from a URL segment (not from the database). As such, EE wikis often display titles incorrectly for a number of reasons:

  • punctuation not allowed by EE’s URL functions
  • capitalization, because EE interprets the display title directly from whatever is in the URL
  • hyphens and underscores, whichever is set as the system’s default word-separator character

For example… say you have an article named

My Hyphenated-Word Article (with parentheses)

When you create that article, the URL becomes something like:

http://mysite.com/wiki/my-hyphenated-word-article-with-parentheses

When the Wiki Module generates a title to display, you get something like:

my hyphenated word article with parentheses

I’ve pulled out too many of my hairs dealing with this frustrating handling. So, I wrote this extension.

A Solution

With Nicer_Wiki_Titles active, when you create or rename page, the text from the “Rename” field is copied directly into the database as a ‘Nice Title’ and displayed in your wiki templates with a variable you select.

You can customize a bit using the three settings:

Tag to replace: Select the tag you wish to replace in your templates with a Nicer Title. (default: {nicer_title})
Use basic page title: If a Nicer Title is not registered, should the extension display the default title instead? (default: yes)
Fallback text: If a Nicer Title is not registered and you prefer the extension to not display the default title instead, you can specify fallback text to use instead. (default: blank)

note: For now, the extension only works in basic article templates. It will not work on special pages (including revision pages) or in title lists. I hope to add support for this soon.

Grab it now…

Get the extension - download RogEE Nicer Wiki Titles (zip)

Nicer Wiki Titles @ devot:ee - http://devot-ee.com/add-ons/nicer-wiki-titles/

Hg repo @ BitBucket - http://bitbucket.org/rogee/nicer_wiki_titles/

RogEE (my EE add-on homepage) - http://michaelrog.com/go/ee/

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.