[pmwiki-users] Any way to test : if backlink exists ? (then print something)

ABClf languefrancaise at gmail.com
Tue Jan 31 17:32:24 PST 2023


(following backlink question)

Thank you for your enlightenment Petko ;
native pmwiki behaviour, as exposed, will be fine for my purpose.

Le ven. 27 janv. 2023 à 07:40, Petko Yotov <5ko at 5ko.fr> a écrit :
>
> To directly print the backlinks, use a pagelist:
>
> (:pagelist group=Group1,Group2 link=MyPage:)
>
> or, for example in a group footer:
>
> (:pagelist group=Group1,Group2 link={*$FullName}:)
>
> If you don't want all the backlinks but simply different messages
> whether there exist pages with links to here, again this can be done in
> the core with a pagelist, not with a conditional:
>
> (:pagelist group=OtherGroup link={*$FullName} count=1
> fmt=#groupbacklinks:)
>
> Then in Site.LocalTemplates:
>
> (:markup class=norender:)
> [[#groupbacklinks]]
> (:template first:)
> %green% {$$group} has links to {*$FullName}.
> (:template none:)
> %red% {$$group} has NO links to {*$FullName}.
> [[#groupbacklinksend]]
> (:markupend:)
>
>
> If you're set on using a conditional like (:if links OtherGroup.*
> {*$FullName}:), let me know, we can write one.
>
> Petko
>
>
>
> On 26/01/2023 21:36, ABClf wrote:
> > I'm willing to test if MyPage has backlink(s) in OtherGroup, then
> > print backlinks.
> > I'm not sure whether native PmWiki will let me do this, or if
> > additional markup is requested (in that later case, would someone be
> > able to do it) ?
> > documentation used :
> > https://www.pmwiki.org/wiki/Cookbook/ConditionalMarkupSamples
>



More information about the pmwiki-users mailing list