GithubHelp home page GithubHelp logo

Comments (4)

crochefort avatar crochefort commented on July 19, 2024

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.

from wet-boew-php.

upsonp avatar upsonp commented on July 19, 2024

@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.

from wet-boew-php.

michael-milette avatar michael-milette commented on July 19, 2024

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:

  • Have different bt_fa.php files for different sections of the site or different purposes.
  • Avoid having to modify a file included in the WET-BOEW-PHP directory structure - I can put it anywhere.
  • Give people the option to statically set or dynamically manage the code generated by bt_fa.php.

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
+- Video 1
| +- Multimedia help
|- Video 2
| +- Multimedia help
|- Video 3
| +- Multimedia help

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.

from wet-boew-php.

upsonp avatar upsonp commented on July 19, 2024

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

  • leave the breadcrumbs the way it currently works using $_NAVPATH['title_'] and $_NAVPATH['link_']
  • Manually specify a breadcrumb trail by turning $_NAVPATH in to an array ($_NAVPATH['title_'][0] and $_NAVPATH['link_'][0], $_NAVPATH['title_'][1] and $_NAVPATH['link_'][1], ..., $_NAVPATH['title_'][n] and $_NAVPATH['link_'][n])
  • or dynamically generate them with magic of some kind, probably by using $_NAVPATH as an array, but generating the elements from PHP variables like referrer page.

from wet-boew-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.