Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi
When I combine some php code with an insert view, my php code doesn't work. All of the php code, except for the opening <?php tag, is displayed as text.
Glenn
Comments
Comment #1
manoloka CreditAttribution: manoloka commentedYep, I've got the same, it won't read
tags at all
Comment #2
manoloka CreditAttribution: manoloka commentedI'v rearranged the weight in the input format and didn't sort anything
I'v using this php as the tag <?= $tid ?>
What am I doing wrong?
Comment #3
manoloka CreditAttribution: manoloka commentedHi there,
Am I expecting the wrong behaviour?
When I use [view:taxonomy_term==45] I get what I was expecting but If I use [view:taxonomy_term==<?= $tid ?>] (obviously giving $tid=45) I just get an empty page.
Is this a bug or am I asking too much to this module?
Please a quick answer would be appreciate so I can move on to find what I really need.
Thanks
Comment #4
xtfer CreditAttribution: xtfer commentedI'm not sure what variables are available to you through the input filters, but have you tried:
[view:taxonomy_term==
print $tid;
]Comment #5
manoloka CreditAttribution: manoloka commentedYes, I have tried that and didn't work.
Any other suggestions?
Thanks
Comment #6
manoloka CreditAttribution: manoloka commentedSo, is that the expected behaviour or something isn't working ?
Comment #7
nevets CreditAttribution: nevets commentedThere are no predefined variables in the node body. You would need something like (note this only works when displaying a node by its self.)
To work the PHP filter must run before the view inline filter.
It uses the first taxonomy term.
Comment #8
Pasqualleclosing all D5 issues