Back to top

Autore Topic: Porblema ItemID articoli  (Letto 1782 volte)

Offline TheDuke

  • Nuovo arrivato
  • *
  • Post: 28
    • Mostra profilo
Porblema ItemID articoli
« il: 19 Gen 2012, 05:59:33 »
Ragazzi ho un problema strano, almeno così mi pare..
Scrivo un articolo e lo metto in evidenza, tutto ok fin qui, l'articolo appare in home con 2 link, uno il titolo, che permette di visualizzarlo singolarmente, e uno è il readmore.
Con una logica che non mi è ancora chiara Joomla mi canna l'ItemID di questi due link, passandogli quello della home con le ovvie conseguenze sulla visualizzazione dei moduli.
La cosa non capita sempre, per esempio se sposto l'articolo in una categoria differente magari il problema sparisce e torna quando lo riporto nella sua. In una stessa categoria però possono esserci articoli col difetto e altri senza..
Temo ci sia qualche problemino sul DB...


Al momento la sola cosa sicura è che il problema si verifica solo per gli articoli in evidenza, tutti quelli aperti tramite voce di menu funzionano correttamente

« Ultima modifica: 19 Gen 2012, 06:03:15 da TheDuke »

Offline TheDuke

  • Nuovo arrivato
  • *
  • Post: 28
    • Mostra profilo
Re:Porblema ItemID articoli
« Risposta #1 il: 19 Gen 2012, 06:38:12 »
Ho risolto in questo modo..non sarà la soluzione più professionale che si sia vista..ma funziona

Citazione
For years Joomla users have sometimes had to face one annoying bug when installing a template populated with demo content.  Specifically, Joomla places a value in it’s URLs called Itemid.  This is important to Joomla’s functions, essentially telling the software where the loading article or item belongs on your site, and laying out the modules accordingly.  The problem is when an item has no defined menu or source.  Like a good lil’ program Joomla just assumes a default value – one.  The problem with this is ItemID 1 is the frontpage of your site, so instead of loading your article or item in a formatted template that looks good, it just delivers the frontpage, with or without your article depending on your template.  All the other modules appear and you either get the home page or a cluttered mess resembling it.

I struggled for several hours with this problem, scouring the web for hints.  I found several, and none worked.  It seemed everyone rigged up some patch to get around the issue with their own sites, but nobody had actually solved the main problem.  When I finally found the answer I was shocked at just how easy it was.  The following was posted by ryogi on the Joomla forums originally, and I share it in the hopes of assisting other stranded web developers.
Problem description – The links to articles on frontpage add “itemid=1″ when the page is loaded using “Home” link. So all the article links with “itemid=1″ open on frontpage instead of article page layout.
Reason – This happens because the section to which the article belongs does not have its own “itemid”
Solution – Create “itemid” for each section of articles.
Procedure -
 -> Select Menu Manager from Menus link
 -> Create a New Menu Item – E.g. “Dummy Menu” (You can choose any name you want. This is not to publish on any module position. This is just a dummy menu item for the purpose of generating itemid for each article section)
 -> From Menus pulldown select “Dummy Menu”
 -> New
 -> Under Internal Link -> Articles -> Section -> Section Layout
 -> Select first section from right hand side first option
 -> Give a suitable title & alias. I suggest using the title of the section to avoid any confusion.
 -> Save
 -> Repeat this process for each section of articles that you wish to publish on front page.
 -> Problem Solved
Please note you do NOT need to publish this menu item anywhere.
 Also note that if you have created a Menu link for any section in other menu items then you do not need to create it again under dummy menu.



Qualche consiglio migliore?
« Ultima modifica: 19 Gen 2012, 15:41:06 da TheDuke »

 



Web Design Bolzano Kreatif