It seems the exported module code does only work for CCK fields, not for nd_title (didn't try body).

Custom formatters uses hook_ds_fields_alter() to get them in, correct?
So the exported module should do the same.

Comments

Deciphered’s picture

Yes, that is definitely an option.

The reason I chose not to is the same reason I chose to make exported basic formatters require the Custom Formaters module, I don't like the idea of replicating too much of the existing Custom Formatters functionality, it really defeats the purpose of the export.

I will think on it.

Cheers,
Deciphered.

nicholas.alipaz’s picture

Ended up here after noticing this +1. Also curious about features integration, doesn't seem like custom formatters show up as exportable when creating a feature.

Deciphered’s picture

nicholas.alipaz,

Are you running the latest version? Because it works fine for me. If there's no exportable formatters then it won't show up, but otherwise it should show up.

However, it not showing up is not related to this issue, this issue is about ND formatters not being exportable.

If you are still unable to get Formatters showing up in the Features creation section, please open a new issue.

Cheers,
Deciphered.

Deciphered’s picture

Status: Active » Postponed

I'm marking this as postponed as I haven't yet made a decision on how I want to approach Display Suite in future releases of Custom Formatters as making a Display Suite custom field makes more sense than a formatter for Display Suite... but no finial decisions yet.

nicholas.alipaz’s picture

hmmm, I really don't like cluttering the UI with a lot of extra fields. I would prefer the formatter personally.

donquixote’s picture

In some cases the formatter feels more logical, in other cases the custom field.
Usually the formatter is much better for reuse, because it works on every field of this type, not just a specific one.

This being said, I nowadays always code my formatters in custom modules :) so no need for custom_formatters module, for me personally.

Deciphered’s picture

@donquixote,

Yes Custom Formatters are re-usable, but given the lack of context when making a formatter for a Display Suite field you aren't really building a Formatter in a re-usable fashion, but essentially just using Custom Formatters as to do what Display Suite can do itself.

 

However, with that said I also agree with @nicholas.alipaz, I don't think making extra fields is essential when you could just format an existing field.

 

Ultimately the biggest reason to drop support for Display Suite (which I absolutely love as a module) would be to keep Custom Formatters doing what it was built to do, which is create custom Formatters, and Display Suite fields are not CCK/Field module fields and do not use Formatters, nor does Fieldgroup or Multigroup, whereas in Drupal 7 Field collection (multigroup replacement) does.

I don't think I'll drop support for DS or any other currently supported modules in the 6.x-1.x branch, but I haven't decided what I will do if I ever choose to backport the 7.x-2.x branch to 6.x-2.x.

Deciphered’s picture

@donquixote,

P.S., you can export Custom Formatters to the Drupal API format, which is definitely the recommended thing to do for performance reasons, which is exactly the same as writing your formatters in custom modules, except that you get a better testing experience... but that's just my biased 2c.

nicholas.alipaz’s picture

Well, you already have your formatters sectioned out into separate code. What would be wrong with just making them a separate submodule? Custom Formatters DS Integration.

donquixote’s picture

Yes Custom Formatters are re-usable, but given the lack of context when making a formatter for a Display Suite field you aren't really building a Formatter in a re-usable fashion

For nd_title, that is certainly reusable across content types :)
(but not across fields, obviously, as there is only one nd_title field at a time)
Imagine, you have a custom formatter that the title as a signwriter image, or as a marquee (ouch), that is certainly useful to have available as a formatter on the title element - instead of it being a separate field.

(All I'm saying here is not for my own use, just to add some interesting points to the discussion. So, pick and discard from it as you see fit)

Deciphered’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)

I am no longer supporting any Drupal 6 modules, as such I am marking this as closed.

However, I am open to taking on co-maintainers, if you wish to do so contact me via me D.o contact form.