Вопрос

I am quite new to Joomla, and recently built a template for it. Everything has gone well in building the template, but I am now stuck with populating the content. I'd like to add blog functionality. Here is the structure at the moment.

Home Page (Category Blog) for my blog articles.

In index.php, there is a check for whether the user is on the home (default) page. If they are, it adds a few different divs that give the home page a slightly different feel from the content portion of the website. The homepage displays just fine, my problem occurs when I actually select the "Read More" of a blog article. It seems to be staying on the default page and repopulating the "Component" with the content from the new article. The result is that the single blog article looks like the home page.

If possible, I would very much like to avoid using the "hidden menu" solution to this (which does solve the problem since I can assign modules to the menu item, and joomla no longer thinks it is on the default page).

I am looking for a solution which I can set up and then will not need to complete any intermediate steps in the future. The ideal workflow is: Create Blog Article -> Assign to Blog Category -> Home Page updates with new blog article -> Single Article Page gets used to display the article (NOT the Home Page).

I have so far been unable to come up with my own solution, or find another on the internet. Help is greatly appreciated.

Это было полезно?

Решение

in Joomla!, Itemid is important. To test where your site goes, you need to disable SEF and check the Itemid in URL. Because Itemid (id of menu link) mostly determines how the site will look.

One menu link can be displayed different if it uses different Itemid (because you can set different parameters in menu link). With itemid you can differentiate between the home page and other pages.

Mostly, using hidden menu solves all the problems (e.g. because plugins and modules don't have any menu link and they need to get some), see more info: http://www.phoca.cz/documents/16-joomla/338-using-sef-in-joomla

I think, there is not better solution for this.

Jan

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top