mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 13:05:53 +03:00
[GH-ISSUE #271] Menu Items #232
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#232
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bet0x on GitHub (May 16, 2018).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/271
Originally assigned to: @jasonmunro on GitHub.
How i do modify or add menu items?
@jasonmunro commented on GitHub (May 18, 2018):
This is where the site module set comes in. You can use it to override other modules, or add your own, including menu items. I don't have time to elaborate just now, but will follow up when I can (and on your other issues). Sorry about that!
@jasonmunro commented on GitHub (Jun 27, 2018):
To add a link to the main menu of Cypht, you will need to modify the site module set in 2 places. First you will assign your module (your custom code) to a page request identifier in the modules/site/setup.php file like so:
then you need to create the module in modules/site/modules.php. It will be named with both the module type, and the value from above (my_custom_link), like so:
That's it :) modify the $link variable to control what you want to insert into the menu. Make sure the site module set is enabled in your config, if it isn't add it and rerun the config gen script.
@bet0x commented on GitHub (Jun 27, 2018):
Great, i started to implement my custom menu, required a bit more of code to make a new section but it works.
I added a new block element for this, using
main_menu_startfor the output.Also after a change, you need to RE login to take effect on the changes made, maybe because i didn't use debug mode right?
@jasonmunro commented on GitHub (Jun 27, 2018):
Nice! actually the folder list is cached, so refreshing the page does not actually refresh it. You need to use the "reload" link at the bottom to cause it to be recreated. You will want to use debug mode for module development - specifically when adding/remove/re-assigning modules because in production mode that is cached when the config gen is run. As you noticed output modules have a built in html_save() method for potentially dangerous output, there is also a trans() method if you care about supporting i18n.
@bet0x commented on GitHub (Jun 27, 2018):
@jasonmunro Yes, i just started and i already saw the trans module, i will be working on some tutorials for people. Everything is so clean!