1

I'm building a proper extension for the management of real estate, I would like to use the added "Image Metadata" field "Show in list view" as the extension tx_news does.

I can build this option in exactly as tx_news does but in case the site instalation uses both extensions, does this cause a conflict ? ( I'd use the same field name showinpreview )

Should I use a different field name to avoid trouble?

( I plan to use this feature in the exact same fashion, so I can easily share the use of the field in the "sys_file_reference" table ... if there was no other conflict there could be the case that an image was used in both extensions and the selection would be determined by one of the two extensions for both or do I misunderstand something here... )

anybody did experiments with this and can avoid me the trouble ?

webman
  • 1,117
  • 15
  • 41

2 Answers2

1

I never had this use case but both ways are possible. - use the same field: less code needed but your extension depends on news - new field: also fine

Georg Ringer
  • 7,779
  • 1
  • 16
  • 34
  • thanks for the answer, so what happens if I declare the variable again in my extension, is that ignored because news already declared it or does that cause a conflict ... I cannot make my extension depend on tx_news – webman Nov 05 '17 at 07:17
  • 1
    Then you override configuration of news as well which could be a problem in later releases. I would recommend then to use a new field – Georg Ringer Nov 07 '17 at 03:34
1

You can use the same field as there also is a field which identifies the table the record belongs to.
Be sure to stay in sync with tx_news. either by a dependency, which might be a great overhead if you don't use tx_news otherwise, or with the same declaration as in tx_news, this can conflict if tx_news changes declaration unnoticed.

You have to declare your own access which will be independent as you use other namespace and context.

Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38