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

Field Frame Matrix

Development and Programming

Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

I’ve got the field frame matrix installed and adding it to the template is a little buggy.

if I put the code into an embeded template it doesn’t get rendered. if I add it directly to the main template it gets rendered but it mysteriously adds Cell 1 Cell 2 Cell 3 at the top of every column.

Is there a work around for this?

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
16 years ago
Brandon Kelly's avatar Brandon Kelly

Can you post your template markup?

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

My code changed several times after I posted this message originally as I tried a number of things. Here is what it stands at now where {photos} is my matrix field name.

The images being added to the cells are not being rendered as images but like this /images/oasis13_1.JPG

{if photos !=""}
<table>
    <tbody>
    {photos}
            <tr>
              <td>
            {exp:imgsizer:size src="{photos}" width="150"}
                <a href="http://{photos}" title="some title" class="lightbox{entry_id}">{sized}</a>
            {/exp:imgsizer:size} 
        </td>
            </tr>
    {/photos}
    </tbody>
</table>

{/if}
       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

Okay, I noticed in the field frame CP that column labels were cell 1, cell 2, cell3. I deleted the label names and now I get what I want.

However no html is being processed.

I changed my template to this, removing the imgsizer plugin. {oursite} is a global variable http://domain.com/

<td>
{oursite}{photos}
</td>

all that renders on the site is /images/filename.jpg

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
16 years ago
Brandon Kelly's avatar Brandon Kelly

Sorry for the delay… been busy fixing other bugs. But this issue is with your template markup.

Your problem is that you’re calling {photos} as a single variable tag in a couple places. As a single variable tag, FF Matrix will return a full HTML table, with the Label names as headers.

You should be using the Column Name as a single variable to get your image URL. So something like:

{photos}
    {exp:imgsizer:size src="{my_photo_col_name}" width="150"}
        <a href="http://{my_photo_url_col_name}">{sized}</a>
    {/exp:imgsizer:size}
{/photos}

Does that make sense?

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

Got it working now.

Thanks for your help and patience.

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

I just found out that matrix doesn’t support the switch tag - would it be possible to get this added to a future update?

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
16 years ago
Brandon Kelly's avatar Brandon Kelly

Yup, coming in the next update 😊

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

Brandon, Thanks - Looking forward to it.

       
kundi's avatar
kundi
23 posts
16 years ago
kundi's avatar kundi

Hello, I’m experiencing some problems with the following code:

test template: {exp:for_loop start="1" end="5" increment="1"} {embed="packet/test_list" selected="{index}"} {/exp:for_loop}

test_list template: {exp:weblog:entries weblog="myweblog" disable="categories|trackbacks" limit="1"} {ffmatrix} <option value="{row_count}"{if embed:selected == {row_count}} selected{/if}>{name}</option> {/ffmatrix} {/exp:weblog:entries}

It occures that only the first 3 items will have selected attribute set, and the next items wont have it. (Seems like there is a problem with comparing embed:selected == {row_count} when the number is bigger than 3. Any idea?

Thanks in advance!

       

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.