gantry / gantry5

:rocket: Next Generation Template / Theme Framework
http://gantry.org
1.04k stars 203 forks source link

Gantry Failure to Inherit Defualt Template #1780

Closed Shankowsky closed 7 years ago

Shankowsky commented 7 years ago

HI,

I currently have the Hydrogen theme set as my default template in Joomla. Assuming all undefined links will generate into the hydrogen theme. I have tried a couple themes and seem to get the same result leading me to think there is an error with Gantry.

My Home page is different from my default page. And so are a few other links. It seems as though Gantry is not routing the links properly or configuring the default template selection properly.

A link on my site like: https://spasso.ca/spasso should take me to the default template (hydrogen), which it does not. As well https://spasso.ca/spasso/profile takes me to a broken version of my homepage which is not even my default.

mahagr commented 7 years ago

Both pages use outline 41 (check the corresponding id from your Joomla admin > Template Styles) and menu item 101 (check from the menu if you have set template style override).

What is the outline name? Which menu item is used?

Shankowsky commented 7 years ago

That's odd because ID 41 for template is set to Home and Home only. When, for testing the hydrogen theme that's the default templater ID 47. The Menu item Home (101) is set to my Home page template ID 41. So you are correct, as well curious how you found those out.

The outline name is Sirene Theme, Home is SPASSO HOME and the default template is hydrogen as mentioned earlier. The links listed earlier are undefined menu items and self populated. Which means, in theory it should default to the default template.

mahagr commented 7 years ago

I found the ids by looking into the body class attributes. :)

The reason why home outline is used is that you're in home menu item. In Joomla template styles (or in Gantry terms outlines) are set by menu item. So in order to fix the issue, you need to create another menu item for /spasso.

There's really nothing special in Gantry on this -- you would have the same issue with any Joomla template as module assignments are also defined by menu item.

In Joomla only matching part of the route is defined by the menu and the rest is handled by the component. Component generally uses the parameters from the matching menu item and Joomla uses the template style defined in the menu item to get the template and its configuration.

Shankowsky commented 7 years ago

That would mean making a new menu item for every single user....? I am using Jomsocial, I am not familiar too much with router settings. can you assist a bit?

mahagr commented 7 years ago

No, it was not what I meant. You just need a new menu item for the views that are not meant to be shown using front page layout/modules. It means that instead of /spasso you have /user/spasso, where user menu item points to JS profile view. In that way, you have the control on what gets shown in all JomSocial profile pages.

Shankowsky commented 7 years ago

How can I set this up? Jomsocial doesn't seem to have this option if I'm not mistaken.

On 10 Jan 2017 2:16 am, "Matias Griese" notifications@github.com wrote:

No, it was not what I meant. You just need a new menu item for the views that are not meant to be shown using front page layout/modules. It means that instead of /spasso you have /user/spasso, where user menu item points to JS profile view. In that way, you have the control on what gets shown in all JomSocial profile pages.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gantry/gantry5/issues/1780#issuecomment-271524535, or mute the thread https://github.com/notifications/unsubscribe-auth/AQp6fuuA76JajQJxih5lJyKCN35lUGEZks5rQ0yHgaJpZM4LdD8P .

mahagr commented 7 years ago

JomSocial should have a few menu types that can be used. If not, then you need to move JomSocial out of the front page or design your front page in a way that also works with the inner pages.

This is a limitation in Joomla and you just need to find a way to work around it.

mahagr commented 7 years ago

I'm assuming that the issue has been solved. Closing.