CF5 & CC5 are so well-coded components i really like,
but without real good instructions/faq's everybody can only do try&error and hopefully receive the right solution...
I use Front List Settings - Display type: Table -> because i don't know, what to insert in the custom fields...
1. Combine more DB-cells in one field.
e.g:Model.firstname & Model.name:Full Name
2. How to use PHP Functions?
e.g:Model.field:return $cell; <- ok, that works, but how can i set own php - codes? How do i use the cells?
Do i have to insert some code into <?php [...] ?> There is nothing written how to use
3.Is it possible to show the urls from the db-entry as URL or images?
but without real good instructions/faq's everybody can only do try&error and hopefully receive the right solution...
I use Front List Settings - Display type: Table -> because i don't know, what to insert in the custom fields...
1. Combine more DB-cells in one field.
e.g:Model.firstname & Model.name:Full Name
2. How to use PHP Functions?
e.g:Model.field:return $cell; <- ok, that works, but how can i set own php - codes? How do i use the cells?
Do i have to insert some code into <?php [...] ?> There is nothing written how to use
3.Is it possible to show the urls from the db-entry as URL or images?
For example.
I use in my db-table more select-options (e.g. 0=no, 1=yes, 2=maybe)
Now i want to show the text and not the numbers!
-> Ok, i could use another model and a small db-table with id, type and the 3 entries but there should be another and more simpy way. So how could i use the php functions of this table settings
In my db-table there are also many url's to logo's & googlemaps. Now i like to set in each row a link -> ok, i can use images & links fields but how do i insert the url from db-entry?
I use in my db-table more select-options (e.g. 0=no, 1=yes, 2=maybe)
Now i want to show the text and not the numbers!
-> Ok, i could use another model and a small db-table with id, type and the 3 entries but there should be another and more simpy way. So how could i use the php functions of this table settings
In my db-table there are also many url's to logo's & googlemaps. Now i like to set in each row a link -> ok, i can use images & links fields but how do i insert the url from db-entry?
Hi,
You don't have to use a real field name, you can use a virtual non existing one, e.g: Model.fullname
Then in the "PHP functions":
Same for the 2nd problem, functions solution:
HTML solution (using the HTML box, which can return different values based on the field value):
Images:
1 image:
Or use the same trick used above in the HTML/functions section to do more processing
Regards,
Max
You don't have to use a real field name, you can use a virtual non existing one, e.g: Model.fullname
Then in the "PHP functions":
Model.fullname: return $row["Model"]["firstname"]." ".$row["Model"]["lastname"];
Same for the 2nd problem, functions solution:
Model.select:$data = array(0 => "no", 1 => "yes", 2 => "maybe"); return $data[$cell];
HTML solution (using the HTML box, which can return different values based on the field value):
Model.select:array(0 => "no", 1 => "yes", 2 => "maybe")
Images:
1 image:
Model.field:<img src="..." />
Or use the same trick used above in the HTML/functions section to do more processing
Regards,
Max
This works:
This doesn't work:
I would like to format some of the db entries like the date - mainly with the usage of variables.
how would i do this? Can i set variables? Can i use php - functions or is this field called 'php function' only reserved for a few functions?
Actually i'm testing the custom list display because it makes much more sense to me and i don't have to ask for every single function. Again i have to say thank you for this really great component but with only few informations how to use it's getting annoying with time - and unlike in cf, when i save my settings - i'm getting to the main view and have to jump each saving action into my CC-form back.
I read most articles in both sections of cf and cc and you two can help just everybody and there seems to be nothing impossible for you und your component. But it would be much easier for you if you just book some time to write a one time tutorial for all your functionalities so evereybody can look at this and pick up the few needed functions. I know, there is already a book - but it's only for cf/cc3 - who would buy today we are already at joomla 3 and cc/cf 5?
matchlist.datetime: return $row["matchlist"]["spielDatum"];
-> 2014-08-20
matchlist.datetime:return "test";
-> test
This doesn't work:
$date=$row["matchlist"]["spielDatum"];
matchlist.datetime: return $date;
-> ''
matchlist.spielArt:$data = array(0 => "no", 1 => "yes", 2 => "maybe");
return $data[$cell];
-> ''
I would like to format some of the db entries like the date - mainly with the usage of variables.
how would i do this? Can i set variables? Can i use php - functions or is this field called 'php function' only reserved for a few functions?
Actually i'm testing the custom list display because it makes much more sense to me and i don't have to ask for every single function. Again i have to say thank you for this really great component but with only few informations how to use it's getting annoying with time - and unlike in cf, when i save my settings - i'm getting to the main view and have to jump each saving action into my CC-form back.
I read most articles in both sections of cf and cc and you two can help just everybody and there seems to be nothing impossible for you und your component. But it would be much easier for you if you just book some time to write a one time tutorial for all your functionalities so evereybody can look at this and pick up the few needed functions. I know, there is already a book - but it's only for cf/cc3 - who would buy today we are already at joomla 3 and cc/cf 5?
And it would be also nice to know, how to set the _EDIT_ and _DELETE_ link in the Custom Font List like
<td>{_DELETE_}</td>
<td>{delete_record}</td>
The function's definition must be in one line, you have it split on 2 lines, this will not work!
In v5 you configure your fields output under the "General" tab, then when you call them under the "custom list", you get the output you have already set, so if you have:
Then calling {Model.field} will generate the edit link!
Regards,
Max
In v5 you configure your fields output under the "General" tab, then when you call them under the "custom list", you get the output you have already set, so if you have:
Model.field:_EDIT_
Then calling {Model.field} will generate the edit link!
Regards,
Max
ok, thanks for your reply. I didnt't noticed, i have to write all functions inline. I'll check this.
But there seems to be some irritation. You write, that i have to set my field output in the "General" tab - in V5 CC, the few settings in the "General" Tab are connection name & published.
Or do you mean the "Settings" Tab in the Font List & Admin List, where i have those many fields to set up the column list, sortable and so on?
But there seems to be some irritation. You write, that i have to set my field output in the "General" tab - in V5 CC, the few settings in the "General" Tab are connection name & published.
Or do you mean the "Settings" Tab in the Font List & Admin List, where i have those many fields to set up the column list, sortable and so on?
I've checked your advices.
There seems to be no difference between:
&
In your second point, i don't understand the functionality:
Where do i have to set
There seems to be no difference between:
$date=$row["matchlist"]["spielDatum"];
matchlist.datetime: return $date;
&
$date=$row["matchlist"]["spielDatum"]; matchlist.datetime: return $date;
In your second point, i don't understand the functionality:
n v5 you configure your fields output under the "General" tab, then when you call them under the "custom list", you get the output you have already set, so if you have:
Model.field:_EDIT_
Then calling {Model.field} will generate the edit link!
Where do i have to set
myModel.myfield:_EDIT_
to call this later with {myModel.myfield} in my custom Code on my Fontlist List Display?
You should set this:
Regards,
Max
myModel.myfield:_EDIT_
in the "Columns list" box, then you can use it in your custom list.
Regards,
Max
This topic is locked and no more replies can be posted.