PTVLinkText-Talk

Summary: Talk page for PTVLinkText.
Maintainer: RandyB
Users: (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

If you put '>[[!' instead of '<[[|' as your second parameter (sequence) in the Markup, you can have the Category-Markup still working. Else [[!Cat]] didn't work anymore in my environment. Does this make sense, or am I deprecating something else with this? -- Markus Jan 2, 2021, at 04:34 PM


Does anyone know how to make this recipe work under PHP 7.2? It needs to be updated, and I don't know how. -- RandyB

Updated. --Petko July 10, 2019, at 08:00 PM

Thank you, Petko! That works. -- RandyB July 11, 2019, at 03:08 AM


The instructions for this recipe says: "For PmWiki versions 2.2.56 or later" one should use a Markup_e function surely this must be wrong? According to http://www.pmwiki.org/wiki/PmWiki/CustomMarkup Markup_e is deprecated... Johan Bengtsson/2018-02-26

Markup_e() was introduced in 2.2.56(58), and became deprecated a few years later with PHP 7.2. The instructions were correct when they were written. I've updated the recipe for PHP 7.2 as of today. --Petko July 10, 2019, at 08:00 PM


Is there a way to default to the $Title whenever it exists, and to the $FullName instead of $Name when no $Title has been specified? - RandyB January 04, 2016, at 02:52 PM

Yes, redefine in config.php it like this:
$FmtPV['$Title'] = '@$page["title"] ? $page["title"] : "$group.$name"';"
--Petko January 04, 2016, at 04:05 PM

Doesn't that just redefine the title of the current page, rather than of an arbitrary specified page? How would you return the title of MyGroup.MyPage (if it exists) or the string "MyGroup.MyPage" (if MyGroup.MyPage has no title)? - RandyB January 04, 2016, at 08:51 PM

Didn't it work when you tried it? It redefines the title of the currently evaluated page by the PageVar() function, ie. any arbitrary page specified like {$Title}, {Otherpage$Title} or in a Pagelist template {=$Title}. --Petko January 05, 2016, at 03:27 AM

The above redefines "$Title" for all pages and purposes. If you prefer, you can instead use a diffent variable name, eg. "$TitleOtherwiseFullName" and call that from your function. --Petko January 05, 2016, at 03:39 AM

Thanks. The first solution changed the format for subsequent invocations of [[{$FullName}|+]]] which was a bug. However, the second solution (using a separate page variable name) solves the problem. -- RandyB January 05, 2016, at 02:15 PM

Talk page for the PTVLinkText recipe (users).