Hot answers tagged

11

Use the EllisLab Playa & Matrix Importer


8

You actually have to do sort="random" in Matrix. It's not like channel:entries in that way.


8

Ah, you want groups of three wrapped and not every third one, wrapped, right? @mediagirl almost has it, but if your returned entries is not evenly divisible by three, you'll have a problem - the final switch will not take effect. You therefore have to close the wrapper conditionally, like this: {exp:channel:entries channel="pages" disable="categories|...


6

After some help from the wonderful Mr. Croxton I was able to sort it out. Here is how to pull this off. When grabbing the data in your model you need to stash the {entry_id} of the parent list (I call mine {e_id} for no real reason). Then, when setting the nested list, provide context with the {entry_id} by using name="employees_{entry_id}". {exp:stash:...


6

Pixel and Tonic obliged me with this request recently. Just purchase a license for Matrix, then email them to request the last available EE1-compatible version (I believe it's 2.5.3).


5

You can use {if banner_matrix_field:total_rows >= 1} graphic{/if} Matrix docs link


5

It’s actually just sheer luck that that worked for you in EE1 – there are a lot of variables at play with EE’s parse order, and most of the time that kind of thing won’t work. You can get it working using Matrix and Playa’s var_prefix parameters, though: {exp:channel:entries} {matrix} {playa var_prefix="playafield"} {playafield:...


5

Take a look at the columns in exp_matrix_data table in the database. Does it have a field var_id? If no, then the version you should set is 2.2. If yes, does it have a field is_draft? If no, then the version you should set is 2.3 If yes, then the version you should set is 2.5.8 Now, set the version number we determined in the previous three steps for the ...


5

Unfortunately, there wasn't a good answer in getting this to work with Matrix. Everything I tried still resulted in a page load time of 14.6 - 17.2 seconds. I worked with EllisLab all day Friday from like 2-9. We spent the day debugging templates, analyzing output, checking for red flags, etc.. I completely rebuilt the template using the native Grid field ...


5

EE simply removes any tags corresponding to custom fields that have no data. So by the time EE is ready to parse the outer {if} conditional, it will look like this: {if > 0} Try wrapping the field tag in quotes: {if '{tech_documents:total_rows search:doc_thumb="IS_EMPTY"}' > 0}


5

If you know how to create a production or development server for EE2, you can create a staging server... if you don't know how to create a development or production server then go find that out first. The challenge with database driven CMS's however is not the servers, it is the database that drives the CMS. Before you can push changes that include any ...


4

Try to use multiple switch tags. {my_matrix_field} <table cellpadding="0" cellspacing="0" border="0" width="210" align="{switch='left|right'}"> <tr> {switch='|<td width="10"></td>'} <td width="200"> <img src="{image}" alt="{alt}" width="200" height="200" /> &...


4

Here's the response I got from P&T support regarding this error. Solved the issue for me: Take a look at the columns in exp_matrix_data table in the database. * Does it have a field var_id? If no, then the version you should set is 2.2. * If yes, does it have a field is_draft? If no, then the version you should set is 2.3 * If yes, then the version you ...


4

Doh! The answer is to use the documented var_prefix parameter so I can then reference the entry's {title} field as normal :$ That Brandon fella has thought of (nearly) everything :)


4

Take a look at the columns in exp_matrix_data table in the database. Does it have a field var_id? If no, then the version you should set is 2.2. If yes, does it have a field is_draft? If no, then the version you should set is 2.3 If yes, then the version you should set is 2.5.6 Now, set the version number we determined in the previous three steps for the ...


4

Inside your Matrix tag pair this will work: {if expiration_date_column > current_time} {!-- not expired yet, put your row html here --} {/if} Or you can use the search parameter on the Matrix opening tag. This is probably better if you only want your result set to include unexpired rows: {your_matrix_field search:expiration_date_column=">{...


4

I think you're on the right track. I'd create a Matrix column that is a dropdown or multiselect. Then output those variables as CSS classes or data attributes and handle the sorting on the client side using something like this: http://mixitup.io/#Documentation. <ul id="filters"> {your_matrix_field} <li data-filter="{matrix_select_col_name}>{...


4

Perhaps there is a more elegant way, but this works: {article_images} {if total_rows > "1" && row_count == "1"} <div id='news_slider'> {/if} <img title="{img_title}" src="{img}" /> {if total_rows > "1" && row_count == total_rows} </div> {/if} {/article_images}


4

You can use Matrix's search parameter to return only the rows of interest: {report_articles search:report_type="=Land"} Show the Land data {/report_articles}


4

There’s a Javascript bug in EE 2.8.0 that breaks the field settings page and other areas of the CP when certain add-ons are installed, including Matrix. It’ll be fixed in 2.8.1, and EllisLab has posted a patch file here: https://support.ellislab.com/bugs/detail/20165


3

It seems this problem can now be fixed by updating to the latest version of Matrix (2.5.10) per the change log found here: http://docs.pixelandtonic.com/matrix/changelog.html Matrix 2.5.10Released on November 4th, 2013Fixed a PHP error that would prevent File cells from saving properly. I havn't confirmed this yet, but it's in the change log. I'll be ...


3

You can't do this with a Matrix tag, but you could use Stash to set a list of the Matrix rows, then get the unique values only. https://github.com/croxton/Stash/wiki/%7Bexp%3Astash%3Aget_list%7D#unique---yes--no- matrix set_list {exp:channel:entries channel="blog" entry_id="123"} {exp:stash:set_list name="blog_related_entries" parse_tags="yes" save="...


3

In case this helps anyone else out there I fixed it with the same versions of EE (2.2.2) and Matrix (2.2.2.1) as the OP and with php 5.4.x and php5.5.x. Essentially I did a diff between the latest version of Matrix (2.5.10) and a couple of older ones and tracked it down to these two parts. File: system/expressionengine/third_party/matrix/celltypes/file.php ...


3

Are you using the latest version of Stash (as of writing 2.3.9)? Your code should work but a few versions back there was a bug in {exp:stash:parse} which meant that parse_vars didn't get run under certain circumstances. https://github.com/croxton/Stash EDIT: just realised you've left off the wrapping channel entries tag which would have made it clear why ...


3

I found the problem - I had custom fields disabled in my entries tag (d'oh!)!! This seems to cause the aforementioned problem if you try to parse matrix tags.


3

If by "robust enough" you mean do they have basically the same features, yes. I've used EE's Relationships without any issues. I love Grid's search:column_name feature. That's a step up from Matrix. However, since it is brand new, it does not work with as many third party fieldtypes as Matrix. I'm sure that will change in the next 2-3 months. Depending on ...


3

So, I've found a way to achieve this, which seems to work in the reduced test case that I created (Grid fieldtype with one column of text type and only one entry being entered in at a time). In the future, I'll create test that's a bit more complex and see if it becomes more involved. The code for this is: <input type="hidden" name="field_id_9[...


3

Unfortunately, I don't think this is supported natively (thought I would love to be shown otherwise!). The way I achieved this was to use the MX Calculator extension to calculate whether a row's count is divisible by 3 or not: {matrix_test} <span style="display: none;"> {exp:mx_calc expression="mod({row_count}, 3)"} </...


3

After updating back to 2.2.1, running the following query will fix this: UPDATE exp_assets_selections SET content_type = 'matrix' WHERE row_id > 0 AND (content_type = '' OR content_type IS NULL) We're about to release Assets 2.2.2 that addresses this, but, while it's still not out, the query above should take care of your problem permanently. This only ...


3

I think this is a bug specific to the EE 2.5.5 version. It looks like the error was occurring in SuperSearch too in 2.5.5 (http://www.solspace.com/forums/viewthread/17280/#62841) and upgrading to EE v2.6 fixes it.


Only top voted, non community-wiki answers of a minimum length are eligible