[pmwiki-users] PTV in feed

Petko Yotov 5ko at 5ko.fr
Tue May 12 08:15:36 PDT 2020


Sorry for the late reply.

This should work, where {$:TitreArticle} is your PTV :

   $FmtPV['$TitreArticle'] = 'PageVar($pn, "$:TitreArticle")';
   $FeedFmt['rss']['item']['title'] = '{$TitreArticle}';

You don't need to use ResolvePageName() like you wrote in the French 
mailing list, in fact you should probably remove it.

Petko


On 12/05/2020 13:48, Benjamin Grassineau wrote:
> Hello everybody !
> 
> Do you think it is possible to insert a page text variable in a RSS
> feed ?
> 
>  I saw that it is possible with page variables, like this :
> 
> $FeedFmt['rss']['item']['title'] = '{$Title}';
> 
> But I would like to have something like that :
> 
> $FeedFmt['rss']['item']['title'] = '{$:var}';
> 
> So I tried to create a php variable with this :
> 
> $var=PageVar($pagename [1],'$:var')
> 
> But this code doesn't work.
> 
> $FeedFmt['rss']['item']['title'] = '{$var}';
> 
> Nothing in "output feed" (sorry for my awful english !).
> 
> Someone have an idea ?



More information about the pmwiki-users mailing list