[pmwiki-users] PTV in feed

Benjamin Grassineau benjamingrassineau at gmail.com
Wed May 13 00:41:52 PDT 2020


Perfect ! It works.

Thanks Petko.

Just a very basic question. I don't understand. $pn is a "default 
argument" of PageVar function ?

Benjamin

On 12/05/2020 17:15, Petko Yotov wrote:
> 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