Hide show article titles

  • nitinvishi
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
12 Anni 3 Mesi fa #889 da nitinvishi
Hide show article titles è stato creato da nitinvishi
Hi,

I was wondering if there is a possibility to show/hide article titles based on the actual article setting.
As of now the config setting in the custom prp component gives the universal option to show or not show article title.

I am using this component to sort news and press release articles by year. Several articles have full text page and several have external website links. I wish to make "title" of these article clickable to maintain content UI.

Therefore, for full text news articles the title parameters in the article would be - Show
While articles with external links (on title click) will basically have the title in the content/text area itself and title parameter set to - Hide

As of now, it can't be done, since the blog layout display is through custom prp layout.

Any suggestions would be helpful

thanks

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
12 Anni 3 Mesi fa #893 da andrea_4g
Risposta da andrea_4g al topic Re: Hide show article titles
Custom Properties does not read article's params, so the result you are looking for is hard to achieve.

IMHO there are 2 solutions:
a) write an output override for CP, that reads the title / look for a 'title' inside the content and render output accordingly accordingly

b) write a CP-type plugin to process results before rendering, adding for each record the 'show title' param gathered from article's param; then write an output override like a), that will render the output according to the param value

b) is more robust than a) but arguably more computational intensive
a) is easier but not as robust, because parsing HTML source is always tricky.

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • nitinvishi
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
12 Anni 3 Mesi fa - 12 Anni 3 Mesi fa #895 da nitinvishi
Risposta da nitinvishi al topic Re: Hide show article titles
THanks so much for this reply.
Ultima Modifica 12 Anni 3 Mesi fa da nitinvishi.

Si prega Accesso o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.154 secondi