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.

Switching ID with Category...

September 10, 2011 4:15pm

Subscribe [4]
  • #16 / Sep 13, 2011 4:59pm

    Mark Bowen

    12637 posts

    Hi Marker Marker,

    When you say it hasn’t done it, what do you mean by that?

    Did anything get output at all? If so then what did you get? We’re going to need a little more information on this.

    Just to let you know that I tested this code in an install and it worked fine for me with an entry which had those two categories selected. I made the exact same categories as you have and this all worked as needed with the opening div tag just being in there the once.

    Mark

  • #17 / Sep 13, 2011 5:07pm

    MarkerMaker

    220 posts

    Yes sorry for not being very specific.

    Output OK page rendered ... Here is the output that resulted from the previous code I posted. As you can see it’s all there just not the id I had hoped for.

    <div id='pp-img'>
        
            <a href="http://my_url/images/uploads/project_img/project_image_1.jpg">http://my_url/images/uploads/project_img/project_image_1.jpg</a>
            <a href="http://my_url/work/category/all" title="Back to Work"> ← Back to work</a>
        </div>
        <!--// pp-img / pw-img when sorted size!-->
  • #18 / Sep 14, 2011 11:29am

    Mark Bowen

    12637 posts

    Hi Marker Marker,

    I have this working fine on a test install that I have on my computer so I’m not too sure why it’s not working for you in the way you need.

    What I would say would be best for you to test this out would be to put this code into your template :

    {exp:channel:entries channel="work" limit="1" status="New|Open"}
    
    {categories}
    {category_name}, 
    {/categories}
    
    {/exp:channel:entries}

    This will show you all the categories that are attached to that entry. It may well be that you need to reformat your conditional slightly.

    I’m going to move this post on down to the Community Help forums as it’s not really a technical issue as such as ExpressionEngine is doing everything it should be doing however I feel that depending on what you’re doing here you may well need a 3rd party add-on here to get you exactly what you need. I’d highly suggest taking a look over on devot-ee.com to see if there’s anything there that might make this a little easier for you.

    Thanks,

    Mark

  • #19 / Sep 14, 2011 12:28pm

    MarkerMaker

    220 posts

    Thanks for this just so I am clear ... Just this code in the template and nothing else or this code replacing the problematic code?

  • #20 / Oct 12, 2011 9:39am

    MarkerMaker

    220 posts

    I have added this code and yes it outputs all the categories associated with the entry ... where do I do from here? Clearly if this is working fine on your version EE there must be a bug or issue with my version of EE.

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

ExpressionEngine News!

#eecms, #events, #releases