luya-module-cms icon indicating copy to clipboard operation
luya-module-cms copied to clipboard

Enhancement : TYPE_LINK Show or Hide options

Open trk opened this issue 7 years ago • 3 comments

Want to use TYPE_LINK block field with telephone number or file and external url options, but don't want to show other options like: link target, internal page, email_address inside TYPE_LINK field or vice versa.

Is it possible to add filter options for this kind of usages?

trk avatar Jun 21 '18 16:06 trk

Yes, we could provide options for zaa-link directive.

nadar avatar Feb 27 '19 08:02 nadar

@nadar Are hideTargetOption, hideInternalOption, hideExternalOption, hideFileOption, hideMailOption, hideTelephoneOption appropriate names for keys?

e.g.:

'vars' => [
   ['var' => 'mylink', 'label' => 'Link', 'type' => self::TYPE_LINK, 'options' => [
         'hideTargetOption' => true, 'hideInternalOption' => true, 'hideMailOption' => true
      ]
   ]
]

hbugdoll avatar Nov 01 '21 13:11 hbugdoll

even we made that mistake also somewhere, but i would not prefix hide, just: targetOption = true/false (where true) is default value to not break BC. also i would add constants:

Link::TARGET_OPTION = true

(not sure where to put the constants yet, but you got the idea i think).

nadar avatar Nov 02 '21 12:11 nadar