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.

Allow EE Code funny

August 03, 2010 8:58am

Subscribe [3]
  • #1 / Aug 03, 2010 8:58am

    SpectraDisplays

    24 posts

    I have a template called product_list which I want to embed in various product pages, so I have downloaded and installed Allow EE Code

    in my channel I have

    {exp:allow_eecode} 
    {embed="embeds/product_list"} 
    {/exp:allow_eecode}

    the template product list is this

    <table id="rounded-corner">
        <thead>
            <tr>
                <th scope="col" class="rounded-topleft">LED Display Model</th>
                <th scope="col" class="rounded">Colour</th>
                <th scope="col" class="rounded">Lines of Text</th>
                <th scope="col" class="rounded">Typical Chars Per Line</th>
                <th scope="col" class="rounded">Brightness</th>
    <th scope="col" class="rounded-topright">Pixel Matrix (HxW)</th>
            </tr>
        </thead>
      {exp:channel:entries channel="products_list" limit="10" textlines="1"}
        <tr class="{switch='even|odd'}">
            <td>{Model}</td>
            <td>{Colour}</td>
            <td>{textlines}</td>
            <td>{Chars_Line}</td>
            <td>{Brightness}</td>
            <td>{pixel_h} x {pixel_w}</td>
        </tr>
    {paginate}
    <div class="paginate">
    <span class="pagecount">Page {current_page} of {total_pages} pages</span>  {pagination_links}
    </div>
    {/paginate}
    
    {/exp:channel:entries}  
    </table>

    if I call the template directly from another template, it works.

    If I use the call from the channel, I only get the <THEAD> section, nothing else appears

    What am I doing wrong?

  • #2 / Aug 03, 2010 5:11pm

    Ingmar

    29245 posts

    {exp:allow_eecode} would go into your template, not the entry. That said I generally advise against using this plugin; there are usually better ways to structure your content.

  • #3 / Aug 03, 2010 8:08pm

    SpectraDisplays

    24 posts

    Im open to suggestions then 😊

    I need to generate tables in different positions on different product pages, but cannot see an easy way round this unless I can insert a template into the channel like this

    What other ways do you suggest?

  • #4 / Aug 04, 2010 6:11am

    SpectraDisplays

    24 posts

    well moving the {exp:allow_eecode} into the table template doesnt work!! it does even less - i.e no table at all!!!!

    and thanks for saying you would do it a different way, but please cannot someone expand on how I achieve what I am after but doing it a different way! 

    As a newbie to EE, this sort of thing is very confusing and so far, pretty hard work just trying to figure out how to do it, so I appreciate that my question may seem trivial, but I can only read the manual, search the wiki so many times, if I cant figure out how to achieve something, then I have no alternative but to post here!!

  • #5 / Aug 04, 2010 1:42pm

    Sue Crocker

    26054 posts

    Matrix might be something you could look at. Look for it over on http://pixelandtonic.com

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

ExpressionEngine News!

#eecms, #events, #releases