How do I see on the title column, only the first word of the title field?
Instead of "AVVISI ENTI ESTERNI" -> "AVVISI"
Instead of "DETERMINA SETT. LL. PP." -> "DETERMINA"
I normally was using SPLIT.
it's here ?
Hi salvo,
In your table, "columns views", add:
Model.titolo:{fn:get_first_word}
Then under "functions", add a "PHP" function, name "get_first_word", and use this code:
echo explode(" ", $this->get("table_view_name.row.Model.titolo"))[0];
You will need to change the "Model" and "titolo" to your real model and title names.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Already on the "Columns views" there is already this:
docu.TITOLO:{view:link_gruppo}
how do I make a link on the record?
So it does not work:
"Columns views"
docu.TITOLO:{view:link_gruppo}{fn:get_first_word}
Found the solution:
"Columns views"
docu.TITOLO:{view:link_gruppo}
"link_gruppo"
Content : {fn:get_first_word}
Another problem:
Now I need to display next to also total record group by group:
Example :
AVVISI (23)
DETERMINA (2)
.......
Hi Salvo,
For this you will need a "hsaMany" relation, with the same table, but a different model name, all inside the same "read data" function.
In this new model you should use a group, and in the "Fields to retrieve", write this:
COUNT(NewModel.ID):docu.count
and enable the "extra fields list".
Now you can use "docu.count" in your table view:
docu.TITOLO:{view:link_gruppo} ({var:table_view.row.docu.count})
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.