logo

Palette - Make it Colorful🎨

Palette - Visual Page Builder, no design degree required.

Live Demo Download Palette

स्क्रॉल

टैक्सोनॉमी कैटलॉग का थीमकरण

22/02/2025, by अज्ञात (सत्यापित नहीं)

नमस्ते, कृपया बताएं कि क्या कोई टैक्सोनॉमी थीमाइजेशन के साथ सामना कर चुका है। मेरे पास सामान्य उत्पादों की एक श्रेणी है, जो मानक के अनुसार श्रेणी की छवि, फिर श्रेणी का नाम और उप-शर्तों की सूची प्रदर्शित करती है। मुझे क्रम बदलने की आवश्यकता है... अर्थात्, पहले श्रेणी का नाम, फिर छवि और उसके बाद उप-शर्तों की सूची प्रदर्शित होनी चाहिए... मैं व्यूज में शर्तों को प्रदर्शित करने के लिए निम्नलिखित कोड का उपयोग कर रहा हूँ:

 

<?php

$vid = 4;

$cols = 1;

$limit = 5000;

 

$tree = taxonomy_get_tree($vid, 0, -1, 1);

if (!empty($tree)) {

  $output = '<table class="catalog-root">';

  $count = 0;

  $total = count($tree);

  

  foreach ($tree as $tid => $term) {

    if ($count % $cols == 0) {

      $output .= '<tr>';

    }

 

$item = '<center>'.l(taxonomy_image_display($term->tid), taxonomy_term_path($term),array('html' => TRUE)).'</a></BR>';

$item .= '<strong><font style="font-size:25px; font-family: verdana;">'.l($term->name, taxonomy_term_path($term)).'</font></strong><BR>';

 

    $children_list = array();

    $children = taxonomy_get_children($term->tid, $vid);

    $i = 1;

    foreach (taxonomy_get_children($term->tid, $vid) as $child) {

      $children_list[] = l($child->name, taxonomy_term_path($child));

      if ($limit != 0 && $i >= $limit) break;

      $i++;

    }

    if (count($children) > $limit) {

      $children_list[] = l('...', taxonomy_term_path($term));

    }

    $count++;

    $item .= implode(' <br> ', $children_list);

    $output .= '<td align="center">'. $item .'</td>';

    if ($count % $cols == 0 || $count == $total) {

      $output .= '</tr>';

    }

  }

  $output .= '</table>';

  

  return $output;

}

?>

 

लगभग सब कुछ सरल लगता है, लेकिन शायद मैं PHP में कमजोर हूँ, मुझे '$item =' और '$item .=' का क्या अर्थ है यह समझ में नहीं आ रहा है, वह बिंदु क्या है यह समझ नहीं पा रहा हूँ :) पहले से धन्यवाद...