WebsiteBaker Support (2.12.x) > General Help & Support

Core Web Vitals problem with FCP and LCP

<< < (5/7) > >>

crnogorac081:
Yes ,placing raw output from one page is just for testing, so we have now starting point. There is a problem because on every page there is set specific page as active menu item and active breadcrumb.

This is my idea how to solve this example
At the beginning of the template file make database query to populate array. After doing this put this array to variable, for use, and do not do database query except when Pages change.

--- Code: ---[1] => Array
    (
        [title] => Page id 1
        [url] => www...
        [children] => Array
            (
                [2] => Array...

--- End code ---
Then every time on page load use this array variable ( and not db query) to feed two functions
Menu( $array, $current_page_id)
Breadcrumb ( $array, $current_page_id)
To generate menu and breadcrumbs but to highlight current menu item (page where you are)

Now is needed to make array and these two functions.

dbs:
From the developer: the menu function has security changes since 2.10.
Unfortunately i can't say more.

Is it right you need for all 3000 pages a different submenu?
My try for a solution is a static main menu for visitors in a menu.html. This html will be generated new if a new page is found in the database.
Maybe the same can be done for the submenu.

crnogorac081:

--- Quote from: dbs on April 22, 2021, 11:49:33 PM ---From the developer: the menu function has security changes since 2.10.
Unfortunately i can't say more.

--- End quote ---
Yes I totally forgot about this! My code may work only if you dont have registered users and pages for their eyes only but all pages are for visible for all (non logged in visitors)

svsanchez:
Hello crnogorac081 and dbs,

1) MENU ARRAY: could you help me with that coding? I understand what you are asking but I simply don't know how to do it.  :roll:

2) The sites have NO registered users (the only user is admin) so no problem with that new security function. Plus, I am still using WB 2.8.3 but if this works I would be glad to finally be able to upgrade 2.13!  8-)

3) 3000 SUBMENUS: My first site has 42 Categories, but many of those categories have Subcategories and sub-subcategories, so I think there could be about 200-300 different menus. The second site though is a geography site for Guatemala and is divided in Departments (States) then Municipalities (Counties), then each municipality has it's own sub menu to display it's history, geography, population, etc... In this case there would be about 400 menus! :-o

Then, there's the Breadcrumbs which of course there is one for each page so more than 3,000+ for each site  :|.

svsanchez:
Hello, maybe this could be a solution: my main site has more than 150,000 pages, each one of them has a breadcrumbs and a menu just like my WB sites.

This site is built with a very old CMS, which generates a static page for each article, as well as a static breadcrumb and a static menu and sub menu for each category.

So I was wondering if there was a way to generate the breadcrumbs and menus / sub menus as static pages that could be included via PHP INCLUDE on each page, it would eliminate the need of querying the DB to create the menus each time a page is accessed. Instead, the menus and breadcrumbs could be generated by calling the "GENERATE MENUS AND BREADCRUMBS" function.

Does that make sense on WB? I will look for a programmer on Fiverr to do this, but would like to know if you think it's feasible, and what you think that I should tell the programmer for this to work?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version