ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MagPie RSS Plugin - Firstparty inside a EE entries Tag - problems

September 17, 2011 2:40pm

Subscribe [2]
  • #1 / Sep 17, 2011 2:40pm

    Neil Evans

    1403 posts

    Can i confirm - as i can find no reference or notes on this - should i be able to use this plugin within a default EE Entries tag?
    http://expressionengine.com/downloads/details/magpie_rss_atom_parser/

    Because at the moment i have an entire page wrapped in an EE entries tag, and then the side column i wanted to to display info from an RSS feed. This works, the description and link comes in from the feed and displays - but the RSS title is being replaced by the main entries title as they use the same tag.

    Now to me - the RSS plugin would either not work at all, or {title} within the plugin would be from the feed and not the main entry.

    I know i can work around this by embedding a template, but that is more load on the server for this simple task - so ideally i would like to avoid it. If this is the way it is supposed to work, then no problem, if not, is it a bug?

    Thanks N

  • #2 / Sep 17, 2011 3:59pm

    Neil Evans

    1403 posts

    As an extension to this - can i query that i of course cannot also use a plugin within a plugin. So i cannot trim (limit the string length) for the description field coming from the RSS feed.

    Therefore, is it logical to feature request the ability to trim fields such as description?
    I have modified the core plugin myself to do this - and it took all of three seconds to add a “desc_limit” parameter and then implement in the plugin. Mines probably a crude hack - but functional for me - thoughts?

  • #3 / Sep 18, 2011 5:52pm

    Kevin Smith

    4784 posts

    Now to me - the RSS plugin would either not work at all, or {title} within the plugin would be from the feed and not the main entry.

    I agree, and I’m not actually sure on this one, nevsie. Whether or not its a bug would be the developers’ call, so let me recommend reporting it as a bug for now and using an embedded template as a workaround until the bug report is either confirmed or rejected with an explanation.

    As an extension to this - can i query that i of course cannot also use a plugin within a plugin. So i cannot trim (limit the string length) for the description field coming from the RSS feed.

    Therefore, is it logical to feature request the ability to trim fields such as description?
    I have modified the core plugin myself to do this - and it took all of three seconds to add a “desc_limit” parameter and then implement in the plugin. Mines probably a crude hack - but functional for me - thoughts?

    The problem you’re running into is regarding parse order. Since EE parses “outward” by default when plugins are nested (meaning it parses the plugin within the outer plugin’s tags before parsing the outer plugin), its parsing the text-limiting plugin inside the RSS plugin’s tags before there’s any content from the RSS plugin to limit. See the “Nested Plugins” section of the User Guide.

    You should be able to text-limit your RSS descriptions simply by adding

    parse="inward"

    to the outer plugin (the RSS plugin). This changes the parse order in this specific case and tells EE to parse the outer plugin before parsing any plugins within its tags.

  • #4 / Sep 18, 2011 8:03pm

    Neil Evans

    1403 posts

    Hi Kevin,
    Cheers for the parse order bit on plugins - makes perects sense and somehting i will make future use of, i had not known of this bit before so very handy, thanks. N

  • #5 / Sep 20, 2011 11:06am

    Kevin Smith

    4784 posts

    Awesome, glad I could help bring that little tip to light!

    Is there anything else in this request that you need help with?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases