(due to very limited space I donât recommend adding more than one link on mobiles)
Settings
Name
Description
custom header links
Custom links to be displayed in the header
links position
Note that when links are displayed on the left, theyâre automatically hidden while scrolling within topics to make room for the title
Adding links is straightforward. Every link needs 6 items. You enter comma delimited values in this order:
link text, link title, URL, view, target, hide on scroll
Link text: the text for the link. Link title: the text that shows when the link is hovered. URL: The path for the link (can be relative). View: vdm = desktop and mobile, vdo = desktop only, vmo = mobile only. Target: blank = opens in a new tab, self = opens in the same tab. Hide on scroll: remove = hides the link when the title is expanded on topic pages keep = keeps the link visible even when the title is visible on topic pages.
If youâre not sure what hide on scroll does, hereâs an example:
Most Liked and Privacy are set to keep and so they remain visible. The other links are set to remove, and so are hidden when the title expands in the header. This only affects topic pages.
Links position: This setting allows you to change the default layout so links will appear on the left near the logo instead of on the right. Note that when positioned to the left, links will automatically be hidden when scrolling within topics to make room for the topic title.
Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.
donât know if this has been suggested, tried reading back but couldnât find it.
was thinking that maybe adding the ability to create âsub-linksâ thus creating the idea of a list that you could edit (text color, background hover etc.) to get results similar to what zoom has
Is it possible to add some basic dropdown menu to an any item?
I couldnât create a dropdown menu with âCustom header linksâ. It seems Zoom did that. I reviewed their dropdown menu via console, but I couldnât figure out how they interfere with the html of this component for adding dropdown to any item.
Is there a way this theme component can allow for dropdown navigation? That means, when I hover over a header link, it has sub-items that appear underneath it. I know that this can be done via html/css as shown here:
Thank you for creating this component!
One question and potentially a feature request: can we show a specific link for a specific group?
For example, if a user is in group customers Iâd like to show a link to the customerâs control panel, if a user is in group workers Iâd like to add a link to a different panel.
I think this would be a very useful feature.
The group name could be the last (optional) parameter.
Grazie per questo! Lâho appena trovato dopo aver provato vari altri banner e componenti. Ă esattamente quello di cui ho bisogno!
Una richiesta/suggerimento: possibilità di riordinare i link. Ne ho appena creati alcuni e mi sono reso conto che vorrei aggiungerne uno in cima. Ora dovrò copiarli e incollarli tutti manualmente, il che è in realtà piuttosto macchinoso poichÊ continuano a sincronizzarsi/aggiornare altre voci mentre li copio verso il basso.
Il trascinamento della selezione o i pulsanti su/giĂš sarebbero molto utili per gli utenti futuri (o per modifiche future).
[quote=âNick_Chomey, post:131, topic:90588â]
Drag and drop o pulsanti su/giĂš sarebbero molto utili per gli utenti futuri (o per modifiche future).
[/quote]Puoi giĂ manipolare lâordine molto facilmente con alcune righe di CSS poichĂŠ utilizziamo la proprietĂ flex.
@Nick_Chomey Mi sono spesso trovato nella necessitĂ di farlo, non solo per questo componente del tema ma per molti altri componenti del tema che utilizzano lâimpostazione type: list. Avevo pianificato di inviare una richiesta di funzionalitĂ prima, ma lâho completamente dimenticata, ma dato che me lâhai ricordato, ne ho aggiunta una qui:
Questo componente aggiunge una classe CSS a ciascun link in base al suo testo. La classe aggiunta è la stessa del testo che assegni al link, tranne per il fatto che gli spazi vengono sostituiti da un trattino (-) e il testo viene impostato in minuscolo. Quindi, alla fine viene aggiunta la stringa -custom-header-links.
Quindi, se aggiungi un link con il testo
privacy
allora lâelemento del link avrĂ la classe
privacy-custom-header-links
Se il testo del tuo link è
Visit Shop
allora la classe CSS sarebbe
visit-shop-custom-header-links
Quindi, ora conosci la classe aggiunta a ciascun link. Tornando alla tua domanda.
Discourse aggiunge una classe CSS al tag <HTML> quando lâutente non è connesso. Quella classe è
anon
Quindi, puoi usarla per nascondere determinati link agli utenti che non sono connessi. Diciamo che ho un link con il testo
Customer Support
e non voglio che venga mostrato agli utenti che non sono connessi.
Nota che display: none; in CSS nasconde il link solo dal rendering del browser, ma è sempre completamente visibile a chiunque esamini il codice sorgente della pagina, ai crawler e ai motori di ricerca.