U_ACP, U_MCP in overall_header_navigation_prepend.html

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
edzela
Registered User
Posts: 94
Joined: Thu Aug 28, 2014 10:00 am

U_ACP, U_MCP in overall_header_navigation_prepend.html

Post by edzela »

Hi guys,
Someone could explain me where is setup this var:
U_ACP
and
U_MCP
and used in

Code: Select all

overall_header_navigation_prepend.html
I am creating a new extension and I want to create new variables like U_ACP or U_MCP, for example: U_OPTION_USER1 and base on that show some new options in the header menu.
I was setting up this var in

Code: Select all

public function add_page_header_link(
) in

Code: Select all

main_listener.php

Code: Select all

 some logic...
if something 
{$option_user1 = true; 
}
else
{$option_user1 = false;
}

		$this->template->assign_vars(array(
			'U_OPTION_USER1'			=> $option_user1,
		));
and in overall_header_navigation_prepend.html

Code: Select all

					<!-- IF U_OPTION_USER1 -->
					<li>
						<a href="" title="" role="menuitem">
                                                                      .........
						</a>
					</li>
					<!-- ENDIF -->
It is not working, looks that always the condition is true.

Please could you advise how to use this kind of var in menu?

thanks and regards
rxu
Extensions Development Team
Posts: 3363
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: U_ACP, U_MCP in overall_header_navigation_prepend.html

Post by rxu »

Did you test if $option_user1 variable is always true? If so, then there's a chance you have some issue with the if/else logic.
edzela
Registered User
Posts: 94
Joined: Thu Aug 28, 2014 10:00 am

Re: U_ACP, U_MCP in overall_header_navigation_prepend.html

Post by edzela »

rxu wrote:
Sun Aug 02, 2020 2:23 am
Did you test if $option_user1 variable is always true? If so, then there's a chance you have some issue with the if/else logic.
thanks for your response, but i checked it and if logic is ok, tell me if i am writing the code in the right places.
Post Reply

Return to “Extension Writers Discussion”