Plugin Layouts

Any idea why the layouts work perfectly fine in one subcategory:

but not in another?

1 Mi Piace

It’s the tags and specifically this line:

You can either reduce the number of tags or try this:

.topic-list-item .discourse-tags {
   display:  unset;
}

That will cause them to wrap, hopefully.

(NB inline-block also works but unset works even better in this case)

2 Mi Piace

Thank you so much! That works.

1 Mi Piace

Thanks for nice work.
but
When i tick: Enable right sidebar globally to yes or no there is no timeline on the topic. It is a bug or no ?? (im testing the material theme)

There will be another reason why you’re not seeing the timeline. Please try using the plugin by itself with other plugins and themes disabled.

My Sandbox has this plugin installed, has enable right sidebar globally turned off and you can still see topic timelines, e.g. https://discourse.angusmcleod.com.au/t/test-event-for-bug/898

Also make sure you haven’t included “topic” in the layouts sidebar right enabled setting.

2 Mi Piace

So much functionality has been provided (you people are great) that it has become rather tough to understand all the options which cross depend on each other (layout vs location plugins) for a power user (but not powerful tech) like me.

But I understand that I shouldn’t bite more than I can chew. But again, can’t help myself when see something new and useful.

1 Mi Piace

I agree! I’m going to be updating the first post of this plugin topic, and my other plugin topics soon with a standardised template that makes it easier to understand the functionality and how to implement it on your site.

If you have any specific use cases in mind for this plugin let me know and I can help you out.

2 Mi Piace

EDIT:

Let’s not talk about why it’s fixed, or not…

Sorry :wink: :slight_smile: (Missed that option)

1 Mi Piace

Anch’io mi chiedevo questo.

È possibile creare i Widget utilizzati dai Plugin di Layout in un componente del tema, oppure i Widget devono essere creati anch’essi da un Plugin?

Probabilmente entrambi funzioneranno, li ho creati nei plugin.

L’unico vantaggio di fare quest’ultimo è che puoi impostare programmaticamente le posizioni dei widget in plugin.rb senza dover utilizzare Admin.

1 Mi Piace

SÏ, è possibile!

Esistono sia un’interfaccia lato server che una lato client per l’aggiunta di widget.

Importa questa funzione

import { addCustomWidget } from 'discourse/plugins/discourse-layouts/discourse/widgets/sidebar';

Poi utilizzala in questo modo in un inizializzatore

addCustomWidget({
  name: <nome del widget>,
  position: <lato su cui vuoi che appaia>,
  order: <ordine relativo ad altri widget sullo stesso lato>
})

Assicurati inoltre che sia abilitato, sia a livello di sito (nelle impostazioni del sito) che per una categoria specifica (nelle impostazioni della categoria).

Hai idea se il CSS per questo debba essere modificato di recente? Ho appena aggiornato all’ultima versione e il CSS non funziona più. Quando ispeziono gli elementi dal browser, vedo ancora l’uso di .nav-container e .locations-map.

Saluti.

Nel plugin non è cambiato nulla, ma il CSS di Discourse potrebbe essere stato modificato.

Questa è la mappa dell’elenco dei topic, giusto? Prova

#list-area .locations-map:not(.expanded) {
  ...
}

Grazie, ma niente da fare. Ho provato praticamente ogni elemento e non c’è stato alcun cambiamento:

.list-area .widget-container .nav-container .leaflet-container .locations-map:not(.expanded) {
  height: 750px;
}

Risolto: serve il commento !important. Grazie per l’aiuto.

.nav-container .locations-map:not(.expanded) {
  height: 750px !important;
}
2 Mi Piace

Funziona perfettamente sul mio sito https://babyforex.net. Tuttavia, se usi la barra laterale destra nella visualizzazione degli argomenti, non dovresti utilizzare DiscoTOC: DiscoTOC - automatic table of contents

1 Mi Piace

Nella pagina dell’argomento,

La navigazione dei post è nascosta.

Credo che la navigazione dei post possa essere spostata a sinistra del sito, mentre la barra laterale si trova sulla destra.

Stai visualizzando l’errore - “Non esiste un’impostazione denominata ‘layouts_sidebar_left_enabled’” e lo stesso vale per qualsiasi impostazione che sto cercando di configurare.

Puoi cortesemente spiegare in dettaglio i passaggi che stai compiendo per ottenere quell’errore? Fornisci informazioni sufficienti affinché qualcuno possa riprodurlo.

Stai utilizzando una build ufficiale aggiornata di Discourse? Supportiamo i nostri plugin solo sul ramo tests-passed.