News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Just about appearing in header and homepage

Started by tarantula901, December 17, 2020, 02:24:17 PM

Previous topic - Next topic

tarantula901

I want an image or other code to appear only on the main page and title, what code can we use for this?



Antechinus


Sir Osis of Liver

Try this -



     if (($context['current_action'] == '')


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Chen Zhen


You can use a portal modification to create a block containing whatever you're trying to display and have it set to appear on the desired pages/sections.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

tarantula901

Quote from: Sir Osis of Liver on December 19, 2020, 10:55:47 PM
Try this -



     if (($context['current_action'] == '')



I think this will do, thank you.

Quote from: Chen Zhen on December 19, 2020, 11:29:59 PM

You can use a portal modification to create a block containing whatever you're trying to display and have it set to appear on the desired pages/sections.

I don't use a portal anyway, thanks.

shadav

just checking in to make sure that that worked for you....
can we mark this topic as solved or do you still need help?


Mick.

Maybe

if ($context['current_action'] == 'whatever the action may be')
  {
  echo '
    <div>your code</div>';
  }


The code Liver posted had 3 parenthesis

tarantula901

Quote from: Mick. on January 15, 2021, 08:39:45 PM
Maybe

if ($context['current_action'] == 'whatever the action may be')
  {
  echo '
    <div>your code</div>';
  }


The code Liver posted had 3 parenthesis

I saw the parenthesis error and solved that problem.

What value should be for the homepage. Home?

Fields like other search help memberlist are okay, but home page doesn't appear.

Required for me homepage.

Mick.

Im not sure since a portal is not an action.. Leave it empty. It will show in non action pages like the portal, message index and topic view.

Sir Osis of Liver

(You can never have ((too many)) parentheses.) :P
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: