-
Notifications
You must be signed in to change notification settings - Fork 530
Closed
Description
The current top bar menu when logged out, in Chamilo 2, shows 6 entries:
These entries always show at the moment, but they should depend on existing pages (from the page table) combined with page categories.
This is a list of what has to be checked before the entries are shown in TopBarNotLoggedIn.vue:
| Entry | Process |
|---|---|
| Home | SELECT count(id) FROM page JOIN page_category on page.category_id = page_category.id WHERE page_category.title = 'index' AND page.enabled=1 AND page.locale='{CURRENT_LOCALE}' AND access_url_id = {CURRENT_URL} |
| FAQ | SELECT count(id) FROM page JOIN page_category on page.category_id = page_category.id WHERE page_category.title = 'faq' AND page.enabled=1 AND page.locale='{CURRENT_LOCALE}' AND access_url_id = {CURRENT_URL} |
| Registration | SELECT count(*) FROM settings WHERE variable = 'allow_registration' AND selected_value = 'true' AND access_url_id = {CURRENT_URL OR GLOBAL IF NOT CURRENT} - use the designed methods for that |
| Demo | SELECT count(id) FROM page JOIN page_category on page.category_id = page_category.id WHERE page_category.title = 'demo' AND page.enabled=1 AND page.locale='{CURRENT_LOCALE}' AND access_url_id = {CURRENT_URL} |
| Contact | Check if the contact page is on for this URL and this locale (not sure of the process here) |
| Language | SELECT count(*) FROM language WHERE available = 1 (only show if > 1) |
This requires a provider or some construct like that.