Hot answers tagged

33

The best way to do this is to proceed carefully and make backups of your database at each step of the way. I have previously written a blog post on this, but will elaborate further. Step 1: Before running your upgrade change all ngen field types to text, don't worry the data won't be lost. Step 2: Next upgrade ExpressionEngine as per the official docs and ...


15

I actually had to do this recently. It's not too difficult to grab all that Matrix data, concatenate it, and save it to your field. First, backup your database (!). Next, create a new template, enable PHP on it, then put this in it: <?php $this->EE =& get_instance(); $channel_id = 1; $field_id = 20; $matrix_cols = array( 'col_id_1', '...


14

I asked this same question for a recent EE upgrade. The answer is on Stack Overflow: https://stackoverflow.com/questions/13041491/expressionengine-1-to-expressionengine-2-upgrade-with-ngen-file-field The EE2 equivalent field is Safecracker File. Worked perfectly for my upgrade.


12

Adding the following script to the control panel allows one to define a custom state for one or more matrix fields. The following script can be modified as needed and then copy and paste into your custom field's "Field Instructions" box beneath your custom user instructions! Many thanks to @MediaGirl for that trick! Ref: How to add a custom JavaScript to ...


12

It sounds like Matrix may not have completed it's update routine. Did you go to Add-Ons → Fieldtypes → Matrix to trigger the update script?


11

Use the EllisLab Playa & Matrix Importer


10

You might want to give Nolan a try - it sounds like exactly what you're after. Nolan enables a very simple matrix style field within a Pixel & Tonic Matrix field


10

Markdown is probably worth considering, although users would familiarise themselves with the two-trailing-spaces linebreak behaviour, which isn't exactly intuitive. If you're using WYSIWYG fields elsewhere that's also an option. For example, you could easily setup a Wygwam editor config which only has the bulleted list control enabled. That would be crazy-...


10

Yep, just check to see if the matrix field total_rows are greater than 0 {if my_matrix_field:total_rows > 0} Matrix field has rows {/if}


9

You can use the search parameter. {exp:channel:entries search:image_custom_field_name="not IS_EMPTY" ...} ... {/exp:channel:entries} This will return entries where the image custom field has been filled in.


8

Row IDs in Matrix are unique for the whole site, like entry IDs. So there only will ever be one row with a row_id of '1' – the first row you ever created. If you’ve deleted that row, then no row exists with the ID '1' anymore. If you just want to grab the first row, use limit="1" instead, which will limit the output to only the first row. If you want to ...


8

Make sure the Matrix field itself is set to searchable as well as the appropriate Matrix columns (see screenshot). If your column wasn’t set to Searchable already, you’ll need to re-save your entries for the change to take effect.


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|...


7

Try my answer on this question - works for me on a single template: EE Code within channel entries {exp:stash:set name="shortcode_inside_field" type="snippet"} <p>Hi there! It's important to set type="snippet" so that {shortcode_inside_field} will get automatically replaced with this sentence by the stash:parse tag later on.</p> ... now ...


7

It's a little tricky to help since I can't find a documentation page for the Allinone Thumbnail Banner jQuery plugin. But if I had to guess based on what the HTML output is supposed to look like, then these are the issues you are likely to be having: The first issue is that you are not closing your ul tag. It needs to be closed before you output your ...


6

I've done this before - I spoke with Marcus Neto about it and sent him the code for it which he blogged about here This should give you enough information to do what you need I think.


6

So I haven't been able to test this, but you should be able to just manually build your form like so: {exp:safecracker channel='mychannel' return='success' include_jquery='no' datepicker='no'} <input type="hidden" name="mychannel-entry[row_order][]" value="row_new_0" /> <input type="text" name="mychannel-entry[row_new_0][col_id_1]" /> <...


6

Not the best though, maybe use 3 columns: Title PT List Nolan Then do something like the following: <ul> {your_matrix_field} <h3>{mx_text_title}</h3> {if mx_nolan_items} <ul> <li> {!-- single line so our backspace isn't having to count blank spaces --} ...


6

I did a lot of different trials trying different methods. In the end no single method is perfect. I've found the thread Brad suggested very useful before. Whatever method you try, make sure to backup everything twice. What I initially did was create two separate test DBs (one being a copy of the EE1 DB and a separate new EE2 DB) just to test out before the ...


6

Try this: <?=fixFloat($progress) <= 100 ? fixFloat($progress) : 100?> That code says: "if fixFloat($progress) is less or equal to 100, then output fixFloat($progress), otherwise output 100". Updated by Nonprofit Tech: I used both @Justin's and @GDMac's response. For the progress bar, I added the max-width: 100%; to the inline style. But the ...


6

You should try changing your conditional to test if the content is not equal to "". Also this should not be an elseif, it should simply be and else statement {exp:channel:entries channel="{segment_1}"} {matrix_primary_tag_pair} {matrix_field_1} {if matrix_field_2 != ""} {matrix_field_2} {matrix_field_3} {if:else} {...


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

There are two available fieldtypes specifically for this purpose. They both work great: MX Lone Star. It has the added advantage of working not only across rows, but across columns, too. Matrix Radio Group. By Pixel & Tonic. This one is not on Devot:ee and might only be described here.


5

You can definitely use Matrix with all of these add-ons. The all use Safecracker at the core, which is compatible with pretty much all fieldtypes (unless the developer did something to make it not work). That "Matrix compatibility" setting is rather new on Devot:ee, so I would be willing to bet the other developer over looked it, as I did. I just updated my ...


5

Make sure you’re running the latest version of Matrix. Matrix 2.5 came with a pretty drastic performance boost. http://pixelandtonic.com/matrix/releasenotes


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 ...


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