Jump to content

Large categorisation and backend long page tree


OLSA
 Share

Recommended Posts

Hello for all,

these days finishing project what is combination of e-commerce and portal website. Problem is "Products" page-tree because content need to be divided inside 48 categories. Also the client gave me content divided in 68 categories, but at the end they accepted my proposal about reducing that number. But problem is that and with 48 categories in backend, "Products" page tree is very large, long list, and very hard for administration. On front-end mega-menu with labels (menu group headings) solved that problem for vistors. And, at the end, I decided to test variant with additional categories to group categories, and result is good (now it's easy for adminsitration to find what they want very easy).

Problem: now urls are longer, and in some parts (categories) not sure how that's can affect on SEO (eg. before: "products/showers/some-product", now: "products/showers-and-bathtubs/showers/some-product"). There are few more examples like that. And another thing is that urls are now longer (more characters, and deeper).

For better administration I added new level of categorisation - I think - that is not a way to go. What is your opinion or suggestion about that? Maybe different, custom admin template, with custom navigation, or some folders? or ...?

Thanks.

Link to comment
Share on other sites

Hi @OLSA

Because SEO is very important in that kind of business/site I would first of all stick to its requirements and that to other things like the usability of administration etc.d

In your second example, you can change "showers and bathtubs" to something more general like "bathroom". In that case, you will have additions keyword in your URL. If your page name includes stop words (and, or, but, of, the, a, etc.), it's not critical to putting them in the URL. You don't have to leave them out, either, but it can sometimes help to make a URL shorter and more readable in some sharing contexts. Use your best judgment on whether to include or not based on the readability vs. length.

As for best URL structure, I would recommend  "site.com/bathroom/showers/product". You can do it by using URL segments, so you can have desired page tree in admin and perfect URL structure on the frontend. Of course, it's much more work and there is a lot of small things like canonical links, redirect etc that you have to think about. 

As another way to make your URL shorter you can move only last "product" part to "products", so you will have "products/product". 

Don't forget to use schema.org or other for breadcrumbs.

 

 

  • Like 5
Link to comment
Share on other sites

Thank you Zeka,

6 hours ago, Zeka said:

In your second example, you can change "showers and bathtubs" to something more general like "bathroom".
...
As for best URL structure, I would recommend  "site.com/bathroom/showers/product".

Can't use this concept because, as example, they have category "faucets", and there are "faucets" for kitchen and for bathroom. Also they have "colors" for wall paintings, "floors" (wall tiles for kitchen or bathrooms can be the same product), and there are other examples where can't use that principle (divide products by area)...
Also, grouping categories really helps to get cleaner administration, but also get me in another "problem" where I get unbalanced page tree (levels), as example:

1) products:

- faucets
---- faucet-product-1
---- faucet-produc-2
.
.
- floors
---- parquet
-------- parquet-product-1
---- laminate
-------- laminate-product-1

6 hours ago, Zeka said:

 You can do it by using URL segments, so you can have desired page tree in admin and perfect URL structure on the frontend. Of course, it's much more work and there is a lot of small things like canonical links, redirect etc that you have to think about.

I use PW few years, and build many custom things (not polished yet to put it here, but will do it for this great/the best community), but never use PW concept with URL segments. Read about that, sounds to me very interesting, but never had time to investigate, how and when...
 

6 hours ago, Zeka said:

As another way to make your URL shorter you can move only last "product" part to "products", so you will have "products/product"

Yes thinking about that, but that not decided to use that concept because in administration would be chaos (initial content is ~2000 products, but client has plan to place 10 to 20 000 products, build importers..).  Also for ajax, filters.. in backend is "easier"... "where parent category is my parent"...

In all I agree with you, but sorry because in first topic, I didn't write other details about this website.
Thanks.

Link to comment
Share on other sites

This is off-topic,  but here is drag and drop JSON tree page module (or menu manager) what I build inside this project to solve client task to get much as simple solution to manipulate with Main menu (and all other website navigations).

Also, please that this topic go in same direction as it started. This is only short of-topic.

What this module do:

1: clone page tree and build JSON string (it's good if you have few thousands of pages), and in rendering you don't have in runtime to build main menu
2: if you have some special cases where need to do some correction for main menu, you can do it very fast and easy (do not need to "move" DB large page tree, you "moves" inside small JSON)
3: you can save ("export") somewhere current tree, and experimenting with menu
4: you can create page tree Menu, and child "Top menu", "Sidebars", "Fotter menu" etc...

I build this for this project, and main target was to leave real PW page tree, but add options to manipulate with that if needed. Also one of target was to get faster page rendering, done testing (in this project with >2000 pages, get faster pages rendering about 25% and more).

How to use it:

1) download attached zip (at the bottom of this message) and install like any other PW module
2) create "JSON tree" type field and place it on some template ("menu", or if you like place it on "home", or...)
3) you can add pages one by one (first tab), or if you have large page tree, in second tab set your "max deep level", set what parent you want to skip their children, and press "Create list"
4) press Save
5) now you can drag and drop and create custom tree (and after changes press save)

How to edit some list item:

Press on some list item button "pencil/edit", and in the bottom you will get that page selected, change that to some another page... And press Save.

How to create "Label" item, in next version that would be different, but now it's can be done:
1) Create template "label" (only title field), create some pages ("labels"), and after select that pages inside JSON tree and append children to it (drag and drop).
2) In rendering process check if template=='label'...

How to render page tree (Menu):

As example, call:

// field is on page with id 3600
// fieldname is "tree"
$menu = $pages->get(3600);
// var_dump($menu->tree);
echo mainMenu( json_decode( $menu->tree)); // mainMenu is method in function.php, there you go through tree and create UL,LI...

NOTES:

1) What is inside "mainMenu" function?

Do var_dump(...) before function call and will understand what that function need to do.
We have JSON objects with attributes, eg. "pwid" store page ID.
If you don't build multilanguage websites, you don't have to call PW page (there is also attribute "slug").

// function.php
// you need to create function inside function.php
// this is only example

function mainMenu($items){    
	$out = '';	
	foreach( $items as $item ){
        // please note main attribute "pwid" it's store PW page id
		$i = wire('pages')->getById($item->pwid)->first();// in my example need this because multilanguage project
        .
        .
        .
        .
    }
}

This module is totally unpolished (first version).

Here are few screenshots:

- First image shows process when module clone PW page tree where you can add desired pages to list.
- Second image shows option where you can add pages one by one, or select multiple and add.
- Third image shows what happened after you press button "Add to list" or "Create list".

Regards.


JSON-Tree-1.jpgJSON-Tree-2.jpg

JSON-Tree-3.jpgJSON-Tree-4.jpg

FieldtypeJSONtree.zip

  • Like 2
Link to comment
Share on other sites

1 hour ago, OLSA said:

Yes thinking about that, but that not decided to use that concept because in administration would be chaos (initial content is ~2000 products, but client has plan to place 10 to 20 000 products, build importers..).  Also for ajax, filters.. in backend is "easier"... "where parent category is my parent"...

 You definitely should take a look at URL segments. The power of URL segments is that your URL structure can be different from you page tree structure and in your case, as, for me, it is highly desirable.

I think that is not a good way to place products under categories because some products can be relative to several categories. How will you handle it?

  • Like 1
Link to comment
Share on other sites

2 hours ago, Zeka said:

I think that is not a good way to place products under categories because some products can be relative to several categories. How will you handle it?

+1

I have products/product (-> parent/children in the tree) and separate categories/sub-categoies/.../category, tags/tag-group/tag, etc. parent/children in the tree and Page references + URLsegments to do the routing. Otherwise one faces the issues @OLSA is facing.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Zeka said:

I think that is not a good way to place products under categories because some products can be relative to several categories. How will you handle it?

No, no in this product had very large place for clean categorisation. It is very easy to separate tools and showers or tiles or parquet or painting colors...

Except, had that problem on category level, but for that use "tags". As example, in category "Tools" are about 100 products, but also inside that category had tags "for painting", "cleaning"...

Also know what are you talking here, as example in some rental site some house can go to rent and sell at the same time (that was my client request in one project). Solved that without problem using "tags". Low level item is property, but same property can have various status... Also property can be house, flat, ship...whatever...

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...