Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Language - minor error in documentation #155

Open
rowansentesy opened this issue Apr 12, 2021 · 0 comments
Open

Template Language - minor error in documentation #155

rowansentesy opened this issue Apr 12, 2021 · 0 comments

Comments

@rowansentesy
Copy link

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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant