Difference between Main page and others

Im trying to put a banner on the first page that loads but not on the others trought the layout.phtml of my theme.

I need to find a conditional like $main_page or something that makes the diference.

With this code you can go to the main page, an also in the user interface, in the navigation tab, you can select which page do you choose as your default

which leads me to belive that there is a way to do this

if anyone knows about it would help me alot if you tell me!

thank you!

My start page (Welcome) gets a CSS class. Maybe this is a way to add custom CSS


1 Like

Hi @MiquelMontes

While I’ve not used it for this purpose, it looks like the BlockPlus module offers something similar.

First of all, thank u!

Second, when you talk about the Block Pluse, you refer to the class that you can give to the blocks or to the templates?

i’ve tried both but i tought it would be difficult to mu users to underestand that for the things to work they have to put exactly a certain name or tamplate, i prefer something that makes things easier for them

if you are refering to something else i’ll gladly hear about it

thanks ! :hugs:

I’ve never seen that part! Thanks !

with that i can find an easier solution than this:

but either way it would be nice if there was a way to do it automatilcally, because the name welcome can be changed or, if you change the main site then that also chaneges.

Thanks a lot i will try to make it better!

Hi Miquel,

Having not used the module for this purpose, I’m only speculating. For proper guidance you can contact the module’s creator on Gitlab. However, it looks like a three stage process:

  1. Install the BlockPlus module

  2. On the page where you wish to use a different template, add a Page Metadata block and choose the page type:

  3. Edit your theme to define changes for each page type, as noted in the module’s documentation.

1 Like

I’ll look further on this! i didn’t know it existed! Thank you very much!