Timeline for How to get the url from a link field in preprocess function
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 14, 2020 at 14:56 | vote | accept | Sarah C | ||
Jan 13, 2020 at 23:45 | answer | added | No Sssweat | timeline score: 0 | |
Jan 13, 2020 at 18:32 | comment | added | user72672 | Try to dump the value of the field using print_r for example. | |
Jan 13, 2020 at 18:00 | comment | added | Sarah C |
Sadly, this produced an error: Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) . The suggestion of if (null !== ($variables['items'][0]['content']['#title'])) { didn't work either, if statement didn't check out.
|
|
Jan 13, 2020 at 17:46 | comment | added | leymannx |
Have you also tried to check if it not isset? As in if (!isset($variables['items'][0]['content']['#title'])) { ... ?
|
|
Jan 13, 2020 at 17:26 | history | asked | Sarah C | CC BY-SA 4.0 |