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.
Hi,
what is the right way to create variant just for 1 specific book?
node type == book && ?!?!
I can see in the context book parent page but I cant understand how to declare it?!
thanks.
Comments
Comment #1
ntigh52 CreditAttribution: ntigh52 commentedThe rule need to be:
or
or
but I can not do this!
Does anyone have an idea?
Thnaks a lot.
Comment #2
ntigh52 CreditAttribution: ntigh52 commentedComment #3
ntigh52 CreditAttribution: ntigh52 commentedI solve that like with the php code on rules in the variant:
and its work!
but, I think there is another very simple way to do that with context and rules in panels....
how can i use the relations or context Instead of Php Knowledge,
Does anyone have an idea?
Thnaks a lot.
Comment #4
ntigh52 CreditAttribution: ntigh52 commentedComment #5
ntigh52 CreditAttribution: ntigh52 commentedI found that if I add a context so I get all the $context variable.
if i add book parent context I get also:
but How can I use this $context variable in php code in Variants » Selection rules ?!
Instead of using:
to user the variable $context like:
can I use this %book_parent:nid ( from context ) in Variants » Selection rules ?!
Thanks