Page 1 of 1

[CLOSED] NEWS - back end layout of custom field

Posted: Sat Mar 22, 2014 5:13 am
by frankmanl
concerns the lay out of a custom made edit page for News module
For my News module I created several custom fields. One of them is a Text area for inserting the embed code of YouTube movies. This text area is (at the edit page) displayed in WYSIWIG mode (I use TinyMCE). Before inserting the embed code the WYSIWYG mode must be switched off. With several colleagues working on the site this is not always done.
I'm looking for a way to switch off WYSIWIG mode for this custom field by default, without switching it off for other text areas, something like:

Code: Select all

(...)
<p class="pageinput">
  {if field is video field}
      switch off WYSIWYG
      {$field->field}
  {else}
      {$field->field}
</p>
(...)
An alternative solution might be to use a Text input field (wchich does not have WYSIWYG options) in stead, but in that case I want the input field to be larger than default, not just a one line box, but a box of several lines.
Can this be done? How?

Frank

Re: NEWS - back end layout of custom field

Posted: Sat Mar 22, 2014 7:34 am
by Rolf
If I remember correctly, for each custom field you create you can choose if it should use wysiwyg or not.

Re: NEWS - back end layout of custom field

Posted: Sat Mar 22, 2014 1:53 pm
by frankmanl
No, Rolf, unfortunately not, at least not in News 2.14.2

Re: NEWS - back end layout of custom field

Posted: Sat Mar 22, 2014 1:57 pm
by Rolf
uhh :-\ let me check...

Re: NEWS - back end layout of custom field

Posted: Sat Mar 22, 2014 2:17 pm
by velden
I personaly think it's not a good practice to let users paste that code into a text area.

Consider using only a text input field and ask for just the Youtube video ID.

That's how I should do it for two reasons:
1. I think it's easier for the editor
2. What if youtube decides to change the code or you want to use another code? You only have to change your template and use the ID.

Re: NEWS - back end layout of custom field

Posted: Sat Mar 22, 2014 2:24 pm
by Rolf
Confirmed, it isn't possible in News module at template level to switch off wysiwyg editor...

Re: NEWS - back end layout of custom field

Posted: Sun Mar 23, 2014 9:54 am
by frankmanl
@velden: insert just the video ID? Thanks for this tip, but I think that is asking too much from my colleagues. They would have to extract it from either the link or the embed code. Apart from that, we sometimes want to show a vimeo video, or something else, or more than 1 movie ...

@Rolf: jammer, maar helaas - we will have to live with this situation.

Thanks for your reactions.

Frank

Re: [CLOSED] NEWS - back end layout of custom field

Posted: Tue Mar 25, 2014 10:03 pm
by Rolf