-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breadcrumb trail enhancment #61
Comments
I suggest that you might add this in your help page and not on the actual code. For now i don't plan having a subsite ... maybe in the futur but they will have their one folder in the root ... So I think is more "personnal modification" than general. |
@crochefort thanks for the input, I definitely will be adding this to the help. It is more specific to me because the site I maintain is pretty big with a lot of unrelated sub topics. I've had to be really careful up to now to keep things in a strict directory structure so the breadcrumbs would work properly. However with this suggestion we will be able to use the bt_fa.php file in two different ways. The way we are currently using it would still work as is so there is no need to do anything different if you don't need the function. If in the future you did require it you could make a small change to a bt_fa.php file and add links to the breadcrumb if you needed to. As it is now the breadcrumb cannot be modified to add additional links if needed, which can be done with core WET when pages are in plain HTML. |
Where do you plan on storing this bt_fa.php file? Instead of having a setting that you can turn on or off, could you just expect the path to the file to be in a variable which I could override in my settings? The default should naturally be an empty string unless otherwise defined and your code should check for the existence of the file before it tries to use it. What this will accomplish is:
One use I could see for this would be to dynamically alter the breadcrumb trail depending on the referrer page. For example, if I understand what you are proposing, I could have the same Multimedia Help page available under a variety of different topics and it would actually show up that way in the breadcrumb so that users could retrace their path back to that page the way they actually got there. For the more visual: Home Normally if I clicked on Home > Video 1 > Multimedia Help, the breadcrumb should show something like: Home > Multimedia Help ...which is where the help file actually resides and doesn't really represent a trail of breadcrumbs showing you how you got to that page. Using a dynamic bt_fa.php which takes into consideration the referrer page, I could have the breadcrumb trail show this instead: Home > Video 1 > Multimedia Help All that being said, I like the idea of also retaining the old system for very basic sites that are organized in a structured folder system. |
I think I see where the confusion is, I just noticed the breadcrumb generator is actually called "bt_fa.php". located /wet-boew-php/dist-php/inc/bt_fa.php. The file should probably be renamed to something more intuitive to eliminate the confusion of when we're talking about breadcrumb files, site specific and modifiable, and the actual generator in the /wet-boew-php/dist-php/inc/ folder which uses the bt_fa.php files throughout the site. Basically the changes I'm proposing to the generator in /wet-boew-php/dist-php/inc/ would allow us to do exactly what @michael-milette laid out. You should have the option to
|
I'd like to add an enhancement to the PHP variant breadcrumb trail generator. At the moment the way the breadcrumb trail is generated is by looking for bt_fa.php files within a directory and then finding bt_fa.php files in parent directories.
The bt_fa.php file looks something like:
Background
The big downfall with the current breadcrumb generator method is breadcrumbs are dependent on where a "subsite" lies in the directory structure. With the above example Otoliths was originally under /science/research-recherche/fisheries-pecheries/otoliths/ on my site. The content owner really wanted the URL to be much shorter for the site, aliasing isn't an option for me, so I moved Otoliths to /science/otoliths/. The navigation to get to the "subsite" from the megamenu and leftside is still the same, but the breadcrumb only shows as (BIO Home > Otoliths) where it should be (BIO Home > Research > Otoliths)
Proposal
I'd like to modify the breadcrumb generator to allow a bt_fa.php file to specify an array to allow more refined control for PHP developers to specify what goes in the trail. The current method as in the example above will still work, but developers will also have the option to use something like:
This allows the developer to create an array the breadcrumb generator will use to add additional elements to the trail without requiring a "subsite" to reside under a specific directory.
The text was updated successfully, but these errors were encountered: