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.

Using category Ids inside a static page modul with {exp:allow_eecode}

March 18, 2009 10:35am

Subscribe [2]
  • #1 / Mar 18, 2009 10:35am

    Batdelfuego

    45 posts

    I’m using the {exp:allow_eecode} inside my Template to have the possibility to use Pages Module and insert EE tags.

    It works fine when I use the entry_id in my EE tag.

    For Ex:

    <ul class="filesList">
    {exp:weblog:entries weblog="literature" entry_id="95" orderby="{title}" sort="desc"}
    <li class="{literature-type}"><a href="http://{literature-file}" title="Download {title} in {literature-type} format">{title}</a><span class="fileInfo">({literature-size})</span><span class="fileInfo date">{entry_date format="%F %d, %Y"}</span></li>
    {/exp:weblog:entries}
    </ul>

    But if I try to use the category to show a list of items inside a category, it wont work.

    Ex:

    <ul id="fpaList" class="list filesList">
    {exp:weblog:entries weblog="publications" category="4" orderby="{title}" sort="desc"}
    <li class="{file-format}"><a href="http://{file}">{title}</a><span class="fileInfo">({file-size})</span></li>
    {/exp:weblog:entries}
    </ul>

    The category and Entries work fine when called directly from a Template… but using {exp:allow_eecode} from a static page module wont work… is there a reason to this? Am I doing something wrong?

    You can vie the page example using category here:
    http://64.13.249.226/about-us/publications/

    And another page example using entry_id here:
    http://64.13.249.226/products/residential-construction/

    It would save me a great deal of time to only embed the category id instead of each entry… and the client could also add entries to each category without me having to put them by hand each time…

    Thanks for the help or suggestions!

  • #2 / Mar 18, 2009 10:47am

    Boyink!

    5011 posts

    I’ve never used the allow ee code plugin, but any time you use a weblog:entries tag where it’s not displaying the main content on the page it’s a good idea to add the “dynamic=off” parameter to it.

  • #3 / Mar 18, 2009 2:02pm

    Batdelfuego

    45 posts

    You know what Michael…

    I tried adding the dynamic=“off”... but I was adding it to the template only.
    Adding it to the static page just magically made everything appear!

    Thank you very much for your reply!

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

ExpressionEngine News!

#eecms, #events, #releases