Search code examples
rsstypo3fluidsimplepie

RssDisplay Extension / Simple Pie


I'm just a little desperate. I installed the RSS Display extension. http://typo3.org/extensions/repository/view/rss_display

Everything works fine, but I have just a little understanding problem.

I pull myself with fluid the Author for the current feed.

<feed:item.get value="author"/>

Than i look whats inside.

<f:debug><feed:item.get value="author"/></f:debug>

Thats the result.

SimplePie_Author prototype object
name => 'Name Name' (12 chars)
link => NULL
email => NULL

So what i need it's to get the name of the author. Unfortunately i am not able to get the value. I am really new in Fluid, Typo3.

Hopefully someone can help me.


Solution

  • One way to do this, is to create a fluid variable author and assign the author object to it. Then you can access the name using {author.name}.

    To create a variable, you could use the ViewHelper <f:alias>, like this:

    <f:alias map="{author: '{feed:item.get(value: \'author\')}'}">
        {author.name}
    </f:alias>
    

    Another way would be to use the extension "vhs", which provides many tools for use with fluid. One of these tools is the ViewHelper <v:variable.set>, which could be used like this:

    <v:variable.set name="author" value="{feed:item.get(value: 'author\'}"/>
    {author.name}
    

    This has the advantage that you don't need to use the variable within the tags of the ViewHelper.

    There are other ways to reach the same goal, without defining variables, but this seems to be the easiest one to me.