PageDirectives-Talk

Multiple empty lines

Often I want extra vertical space between things without using markup. "$HTMLPNewline = '<br/>';" in local/config.php only does one break.
I would like for it to allow multiple breaks. Currently it will show 1 break no matter how many empty lines are present in the editor.
How can we do this? --gnuzoo


Redirect to HomePage

My HomePage displays from address bar url "http://localhost/z/". When I redirect to "HomePage" the address bar URL changes to "http://localhost/z/HomePage". How can I redirect to "HomePage" and not change the address bar URL? In other words, I want to redirect to the root URL "http://localhost/z/" --gnuzoo

BTW, I am using Clean Urls. This appears to work:

$pagename = ResolvePageName($pagename) ;
if ($action=='browse') {
        $p = 'http' ;
        if (isset($_SERVER["HTTPS"])) {
                if ($_SERVER["HTTPS"] == "on") { $p .= "s" ; }
        }
        $CurrentPageUrl = $p.'://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ;
        if ($CurrentPageUrl == $ScriptUrl.'HomePage') { header('Location: '.$ScriptUrl) ; exit ; }
}

--gnuzoo


Wikipedia-like footnotes / references

Is there a way to show a list of all internal or external links (references) at the bottom of a page like Wikipedia?

See Cookbook:Footnotes. --Petko January 15, 2021, at 07:51 AM

Redirect markup

The redirect markup currently does not support the use of http requests.

As I recall, the Cookbook:RedirectIntermap recipe used to support at least some http request functionality. Unfortunately that recipe no longer seems to work at all.

It would be great to have the core's redirect markup support http requests such as: (:redirect mypage myrequest="supply this string to mypage" quiet=1:)

or (:redirect Cookbook:MyPage myrequest="supply this string to mypage" quiet=1:)

or maybe redirect to another wiki or website: (:redirect "https://MyWebsite.com?myrequest=supplythisstringtomypage?quiet=1":)

Is this something that could be added to the core? If not, can anyone fix the RedirectIntermap recipe?

-- RandyB September 14, 2019, at 08:43 PM

The "InterMap" part of that recipe is somewhat more complex than I'm ready to add to the core at this point, so for now I've updated the recipe. With the recipe, with $EnableRedirectExternal, you should be able to use (:redirect {mypage$PageUrl}?myrequest=supply%20this%20string%20to%20mypage:) with the passed string "urlencoded" if it contains any non-alphanumeric characters (you can use the "urlencode" markup expression from Cookbook:MarkupExprPlus (:redirect {mypage$PageUrl}?myrequest={(urlencode "supply this string to mypage")}:)). --Petko September 15, 2019, at 09:48 AM

Excluding some extensions

For (:attachlist:) I have noticed that we can list only the files which have a specific extension. But there is nothing to list all files except those with a specific extension. AudreyC?

This will be available in 2.2.119 with (:attachlist ext=-pdf,-jpg:) or (:attachlist names=-*.pdf,-*.jpg:) --Petko September 15, 2019, at 07:05 PM

detect setting of page directives

Is it possible, say using Conditional Markup, to detect the setting of a page directive such as noleft, or noaction?, eg

(:if pagedirective noleft:)


This is a talk page for improving PmWiki.PageDirectives.