Skip to content

Template Language - minor error in documentation #155

@rowansentesy

Description

@rowansentesy

Description of the problem
I noticed a minor error in the docs when looking at the provided examples on this page:
https://docs.expressionengine.com/latest/templates/language.html#changing-parsing-order
https://github.com/ExpressionEngine/ExpressionEngine-User-Guide/blob/stability/docs/templates/language.md

The examples use the {content} tag, but this should be updated to be {item_content}.
as per RSS Parser documentation: https://docs.expressionengine.com/latest/add-ons/rss-parser.html

Updated 'Examples' Section

Replace {content} with {item_content}


Examples

Here are some examples to help illustrate the parsing order.:

{exp:rss_parser url="https://ellislab.com/blog/rss-feed" limit="5" parse="inward"}
    {feed_items}
        <a href="{item_link}">{item_title}</a><br />
        {exp:word_limit total="20"}
            {!--{content}--}
            {item_content} 
        {/exp:word_limit}<br />
    {/feed_items}
{/exp:rss_parser}

With the above, the RSS plugin will be parsed first. This will allow the content of the {content} variable to be available to the other, nested plugin: "word_limit".

Here is a much more complicated example that demonstrates both parsing orders in action.:

{exp:rss_parser url="https://ellislab.com/blog/rss-feed" limit="5" parse="inward"}
    <ul>
    {feed_items}
        <li><a href="{item_link}">{item_title}</a><br />
                {exp:word_limit total="35"}
                    {exp:xml_encode}
                        {!--{content}--}
                        {item_content}
                    {/exp:xml_encode}
                {/exp:word_limit}
            </li>
    {/feed_items}
    </ul>
{/exp:rss_parser}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions