You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,15 +41,15 @@ Sets the desired style for the breadcrumb navigation.
41
41
This repository contains two helper functions that allow you to use the `Breadcrumb` class more easily in your CodeIgniter project:
42
42
43
43
-`render_breadcrumb()`: Renders the breadcrumb navigation through the `Breadcrumb` service.
44
-
-`replace_breadcrumb_params()`: Replaces all numeric text in breadcrumb links with new parameters through the `Breadcrumb` service.
44
+
-`replace_breadcrumb_params()`: Replace all numeric text in breadcrumb links, along with a set of configured special words including `create`, `edit`, and `delete`, with new parameters through the `Breadcrumb` service.
45
45
46
46
## Usage
47
47
48
48
#### `render_breadcrumb()`
49
49
50
50
This function renders the breadcrumb navigation through the `Breadcrumb` service.
51
51
52
-
Note: If the route contains "log-", the "log-" segment will be automatically ignored in the breadcrumb, ensuring a cleaner and more user-friendly navigation experience.
52
+
Note: If the route contains `log-`, the `log-` segment will be automatically ignored in the breadcrumb, ensuring a cleaner and more user-friendly navigation experience.
53
53
54
54
To use this function, simply call `render_breadcrumb()` from your **view** where you want the breadcrumb navigation to appear. You can optionally pass a CSS class name to style the container element for the breadcrumb navigation. For example:
55
55
@@ -59,7 +59,9 @@ To use this function, simply call `render_breadcrumb()` from your **view** where
59
59
60
60
#### `replace_breadcrumb_params()`
61
61
62
-
This function replaces all numeric text in breadcrumb links with new parameters through the `Breadcrumb` service.
62
+
This function replaces all numeric text in breadcrumb links, along with a set of configured special words including `create`, `edit`, and `delete`, with new parameters through the `Breadcrumb` service.This is particularly useful in improving the user experience as it provides more meaningful and intuitive breadcrumb navigation.
63
+
64
+
Users typically interface with breadcrumbs that reflect the structure of the website or application. By replacing generic numeric values or specific technical terms (`create`, `edit`, `delete`) with more context-specific text, you can make the navigation more intuitive and user-friendly. It allows users to understand their current position and navigate back to previous pages easily.
63
65
64
66
65
67
To use this function, simply call `replace_breadcrumb_params()` from your controller, passing in an array of new parameters. For example:
This will replace any numeric text parameters in the breadcrumb links with the corresponding values from `$newParams`.
74
+
This will replace any numeric text or specially configured words such as `create`, `edit` and `delete` in the breadcrumb links with the corresponding values from `$newParams`.
73
75
74
76
Note that you must have already created an instance of the `Breadcrumb` class and set it up with the appropriate links before calling this function.
0 commit comments