1

My scenario is set Taxonomy value after the page redirected.

if(($weight === "Above 90") && ($height === 'Above 7.0"')) {
    $form_state['redirect'] = $base_path . '/example/other/redirect-1';
    $term = taxonomy_term_load('371');
    // echo '<pre>'; print_r($term->description); die;
    print render($term->description);
 }

Here, Once the condition is satisfied, its redirecting to the (/example/other/redirect-1)page. But, the Taxonomy value is not displaying in this page.

I am not sure, whether I am doing in a right way, or Please guide me to solve this issue ?

1

You need to pass the term_id along with the $form_state['redirect'] like
$form_state['redirect'] = $base_path . '/example/other/redirect-1/?tid='.$term_id; and get the term_id in /example/other/redirect-1/ page
write something like below

 $term_id = $_GET['tid'];
 $term = taxonomy_term_load($term_id);
 print render($term->description);

I am giving you an idea some modification may need on code. You need to check.

  • did you solved that issue! – DRUPWAY Jan 27 '17 at 9:19
  • No, I have setted the term id along with url , then URL will be changed like '/example/other/redirect-1/371'. Its not getting redirected to the page. I tried, but still I couldn't solve it . – logeshvaran Jan 27 '17 at 9:45
  • try to sent the term_id in query string. – DRUPWAY Jan 27 '17 at 9:56
  • Your url will not change. Updated my answer little bit you can check. – DRUPWAY Jan 27 '17 at 10:00
  • Okay . i will try – logeshvaran Jan 27 '17 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.