The current location of the newly added ecshop template and the link address on the page cannot be associated. because many Classification templates on the website are different, I have created many templates, and the link addresses are basically written to the dead, however, some links on the product details page and list page are not easy to handle. They are also the link addresses of default templates. for example, the default product list template is category. php: I have added a number of different new templates. the current location of the new template and the link address of the page cannot be associated.
Because many types of templates on the website are different, I have created many templates, and the link addresses are basically dead, however, some links on pages such as the product details page and list page are not easy to handle. They are also the link addresses of default templates,
For example, the default product list template is category. php. I have added many different templates: category1.php, category2.php, category3.php, and category4.php.
In this case, the link addresses of all templates are still the default category. php addresses, such as the current location and paging address.
Take my location as an example:
The {$ ur_here} label is the function assign_ur_here in the lib_main.php file. it seems that it cannot be modified,
PHP code
/* Cyclic classification */if (! Empty ($ cat_arr) {krsort ($ cat_arr); foreach ($ cat_arr AS $ val) {$ page_title = htmlspecialchars ($ val ['cat _ name']). '_'. $ page_title; $ args = array ($ key => $ val ['cat _ id']); $ ur_here. ='>
'. Htmlspecialchars ($ val ['cat _ name']). '';}
The link address should be obtained by build_uri. then I found the function build_uri in the lib_common.php file.
PHP code
case 'category': if (empty($cid)) { return false; } else { if ($rewrite) { $uri = 'category-' . $cid; if (isset($bid)) { $uri .= '-b' . $bid; } if (isset($price_min)) { $uri .= '-min'.$price_min; } if (isset($price_max)) { $uri .= '-max'.$price_max; } if (isset($filter_attr)) { $uri .= '-attr' . $filter_attr; } if (!empty($page)) { $uri .= '-' . $page; } if (!empty($sort)) { $uri .= '-' . $sort; } if (!empty($order)) { $uri .= '-' . $order; } } else { $uri = 'category.php?id=' . $cid; if (!empty($bid)) { $uri .= '&brand=' . $bid; } if (isset($price_min)) { $uri .= '&price_min=' . $price_min; } if (isset($price_max)) { $uri .= '&price_max=' . $price_max; } if (!empty($filter_attr)) { $uri .='&filter_attr=' . $filter_attr; } if (!empty($page)) { $uri .= '&page=' . $page; } if (!empty($sort)) { $uri .= '&sort=' . $sort; } if (!empty($order)) { $uri .= '&order=' . $order; } } }
It should be to modify this code, but I do not know much about php. I only need to modify it through common repairs. I have tried many methods but have not succeeded.
Thank you for your guidance.
------ Solution --------------------
The template is a well-written architecture, which is a secondary development. it is a little difficult. you have to fully understand the implementation process before you can start it. Otherwise, it may affect other places: A variety of CMS are the same.
Generally, the "abc. php index. php" is a replacement, for example, "abc.html abc. php ".
The replacement file abc.php.pdf is used to generate a replacement file. you have to find it. you will not replace the modification file {abc} in the abc.html template.
Add abc = $ content2 to the parameters in abc. php. // You can check that there is an array in it and how to replace it. just add a value.