We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Am I using the allow_eecode plugin incorrectly?

Development and Programming

Chad Crowell's avatar
Chad Crowell
242 posts
17 years ago
Chad Crowell's avatar Chad Crowell

Seems like this ought to be working… I know that generally you wrap the allow_eecode tags around a single field, but this is being used in concert with Pages and the field I need to display is the Body field, which contains several entries loops as shown below:

{exp:weblog:entries weblog="snippets" url_title="news_events_intro_text" disable="categories|category_fields|member_data|trackbacks" rdf="off"}
            {content}
        {/exp:weblog:entries}
        
        
        <h2>Our Next Trade Show</h2>
        {exp:weblog:entries weblog="events" disable="categories|category_fields|member_data|pagination|trackbacks" rdf="off" show_future_entries="yes" limit="1" sort="asc"}
            <a href="http://{cf_events_url}" target="_blank" rel="noopener">{title}</a>
            {entry_date format="%m %d %Y"}
            {cf_events_city}, {cf_events_state}
            
        {/exp:weblog:entries}
        
        
        <h2>Press Releases</h2>
        {exp:weblog:entries weblog="pressreleases" disable="categories|category_fields|member_data|pagination|trackbacks" rdf="off"}
            <a href="http://{url_title_path=news_events/press_release}">{title}</a>
            {entry_date format="%m %d %Y"}
            
        {/exp:weblog:entries}
        
        <h2>Customer Success Stories</h2>
        {exp:weblog:entries weblog="csstories" disable="categories|category_fields|member_data|pagination|trackbacks" rdf="off"}
            <a href="http://{url_title_path=news_events/customer_success_story}">{title}</a>
            {entry_date format="%m %d %Y"}
            
        {/exp:weblog:entries}

And my template then looks like this:

{exp:weblog:entries weblog="pages" rdf="off"}

    {embed="includes/header_top" title="{title}"}
    <!-- Insert additional JS and CSS references here -->
    {embed="includes/header_bottom" loc="news"}
        
        <div id="content-left">
            {embed="includes/submenu_news" locs="{cf_pages_submenu_loc}"}
        </div>
    
        <div id="content-center">
                
                {exp:allow_eecode}
                {cf_pages_body_{country_code}}
                {/exp:allow_eecode}
        
        </div>
    
        <div id="content-right">
            Right
        </div>
    
    {embed="includes/footer" loc="news"}

{/exp:weblog:entries}

I’m guessing that this just isn’t going to work to display all this different data. And since this is a Pages template that needs to serve 5-6 different pages its needs to stay very generic.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.