Hello all
i would like to sort a newly created page (blog post) into the category tree. so that when you open the page, the category tree on the left is expanded as you are in the category
i.e. I want to set the cpath manually e.g. cPath = "862_22" and then you should think that you are in category 22
can i set this somehow?
thank you very much for the help / tip
need a new page to be sorted in the category tree (set cPath)
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: need a new page to be sorted in the category tree (set cPath)
Can you use the category descriptions for the blog purpose and then just uninstall the no products module or make a new one with a check for "blog-stuff"?
To me, the simplest approach would be to use the categories in one way or another.
Have you tried just adding the cPath to the URL and check if that is enough?
Sorry, a few unstructured proposals..
//Daniel
To me, the simplest approach would be to use the categories in one way or another.
Have you tried just adding the cPath to the URL and check if that is enough?
Sorry, a few unstructured proposals..
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
-
loop
- Contributor
- Posts: 253
- Joined: Thu Mar 25, 2021 12:26 pm
- Phoenix Version:
- Has thanked: 7 times
- Been thanked: 3 times
Re: need a new page to be sorted in the category tree (set cPath)
thank you for your help!
just found it out:
on top of my page and thenn it shows everything correctly 
just found it out:
Code: Select all
$category_tree =& Guarantor::ensure_global('category_tree');
$cPath_array = tep_parse_category_path("864_22");
$cPath="864_22";
$current_category_id = 22;- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: need a new page to be sorted in the category tree (set cPath)
I'm glad you found something that worked! 
//Daniel
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide