andmm
Total posts: 15
04 Sep 2013 10:26

Hello.

I think this should be easy enough to implement. Just a new field parameter for adding a HTML attribute for the field.

Just to make life easier when implementing some jquery plugin or whatever, like adding a data-role etc.

This example is taken from Flexicontent.

It's not much but it's useful. :)

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
05 Sep 2013 04:58

This is very complex thing in cobalt. With fields like text and checkbox it is ok but it it is geo position selector on the map, where I add this attribute? Or other fields like upload?

It cannot be core field parameter because it will not fit any field.

I can only suggest to make custom field template and add this attribute manually where you need it.


pepperstreet VIP
Total posts: 3,837
06 Sep 2013 06:35

I can only suggest to make custom field template and add this attribute manually where you need it.

BTW, this reminds me on previous discussions about** field template parameters**. In the beginning of Cobalt history it was declared as too complex, too complicated for average users etc. I remember there was a discussion where you mentioned there is going to be a feature like this... is it on C9 roadmap?


Sergey
Total posts: 13,748
08 Sep 2013 03:06

BTW, this reminds me on previous discussions about field template parameters. In the beginning of Cobalt history it was declared as too complex, too complicated for average users etc. I remember there was a discussion where you mentioned there is going to be a feature like this... is it on C9 roadmap?

Yes, this is still on Cobalt 9 roadmap.


Jeff VIP
Total posts: 745
09 Sep 2013 21:01

André Milani Marcos

I think this should be easy enough to implement. Just a new field parameter for adding a HTML attribute for the field.

Yes! But wait, it can be better.

Seblod has a very powerful plugin "Typo" feature in almost every field.

It's not just for adding HTML attributes, but you can use a (raw) field substitution syntax to include other fields also. Think of inserting 3rd-party plugin code, concatenating fields, surrounding fields with divs to change the layout, etc.

A must have feature.


Sergey
Total posts: 13,748
09 Sep 2013 21:52

I do not think it is needed since we have field templates and form templates. We can change as general fields fetch pattern as individual field wraps.

Seblod - even if you can change seblod templates it is applied to all fields and all sections, etc.. There is not system that would allow you to affect single field in certain type.

Also Cobalt has a concept. Section, type and fields has only logic parameters and all display parameters are in template parameters.

It is not true right now everywhere. We are still have to add some display parameters in field parameters because field templates do not have separate parameters. but that will be changed in Cobalt 9 and after selecting field template you may set additional parameters. Then we can add those HTML typo style management.


Jeff VIP
Total posts: 745
11 Sep 2013 21:08

Sergey

I do not think it is needed since we have field templates and form templates. We can change as general fields fetch pattern as individual field wraps.

I'm not sure what you mean by this. I understand it is all about templating in Cobalt and I can see its advantages. But I can't help myself seeing templating as a form of hacking. And hacks aren't always compatible with new releases of Cobalt, Joomla or even php.

Having that said, there are many ways to Rome

Maybe a "new field parameter" is not the right word here, it should be replaced by "new feature".

This enable people like you and others (thank you pepperstreet) to come up with solutions that fit perfectly in Cobalts structure, without resorting to the almighty template. :)

On topic:

What about the creation of a new (code) field which enables us to insert code and field substitutions?


Sergey
Total posts: 13,748
12 Sep 2013 01:23

But I can't help myself seeing templating as a form of hacking. And hacks aren't always compatible with new releases of Cobalt, Joomla or even php.

it is not hacking. because it is not simply changing templates. it is templates system. There is mechanism behind that prevents you to lose changes on update.

But I can't help myself seeing templating as a form of hacking. And hacks aren't always compatible with new releases of Cobalt, Joomla or even php.

Maybe a "new field parameter" is not the right word here, it should be replaced by "new feature".

This enable people like you and others (thank you pepperstreet) to come up with solutions that fit perfectly in Cobalts structure, without resorting to the almighty template.

I totally understand what you mean. But there is small problem. You need attribute to the field, someone need attribute to field container tag, some one need another container tag and class or only class for field tag or container tag.

What I want to say, although this parameter may be useful for some people it is related to how field is rendered rather than how it behaves. And Concept of Cobalt to have only logical parameters. And rendering parameters only in template parameters. And since we do not have field template parameters mechanism, there only option is to change template without parameter.

But If we start add every parameter that people what regarding how field should be rendered, we will end up with endless number as everyone has his own opinion on that.

Let's do this. In Cobalt 9 we will add field templates parameters mechanizm and then we will be open to all sort of parameters there.


Jeff VIP
Total posts: 745
12 Sep 2013 02:50

Sergey

But If we start add every parameter that people what regarding how field should be rendered, we will end up with endless number as everyone has his own opinion on that.

Yes, you got a point here.

Sergey

But If we start add every parameter that people what regarding how field should be rendered, we will end up with endless number as everyone has his own opinion on that.

Sergey

Let's do this. In Cobalt 9 we will add field templates parameters mechanizm and then we will be open to all sort of parameters there.

I am confident you will find the right solution :)


Sergey
Total posts: 13,748
15 Sep 2013 02:07

In a related subject, what about a new parameter for checkboxes and radio buttons for adding an image along with the value.

You can do it in language overrides or simple add HTML inside value.

User VAL_1 as value and add

VAL_1=" Value 1"

or use

Value 1

Directly as value text.

Powered by Cobalt