Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I used a custom field with a small function in a view. Then i created a second view and again tried to make a small function (different name of course). And it tells me can not redeclare mySmallTestFunction().
I am 100% this function is not declared elsewhere.
So can i only use one customfield in all my views?
Comments
Comment #1
casey CreditAttribution: casey commentedCode gets executed for every row.
Comment #2
bis20 CreditAttribution: bis20 commentedDo it That way:
1- create your custom module [testmodule]
2- create testmodule.install file with following syntax:
3- Create testmodule.code.inc file & place your Custom function on it.
4- goto your view and place the following code in Header of view:
5- finally check the loading of include file in your custom php field by following function :
do not forget to flush caches.
B&R
Bis20
Comment #3
marcoka CreditAttribution: marcoka commentedi am not using drupal 6 anymore. i am on seven now. so i can not remember problem details, neither testing it.