Page 1 of 1

Show/Hide html code

Posted: 10 Nov 2017, 17:42
by Bevi
Laravel 2017.10

Hello Sir,

I would like to show and hide anchors in the app.blade.php, depending on the category id.
How am I supposed to check the id number?

Re: Show/Hide html code

Posted: 12 Nov 2017, 11:27
by aimeos
It's better to use the category codes as they usually don't change

Re: Show/Hide html code

Posted: 13 Nov 2017, 12:33
by Bevi
aimeos wrote:It's better to use the category codes as they usually don't change
Sir, I do use category codes (the catalog ones), I just want to create some if statement to check them.
Something like:

Code: Select all

@php $_GET['f_catid'];
				if($_GET["f_catid"] == 15)
but meant for blade files.
I tried

Code: Select all

Input::get('f_catid')
But I get the following error: Class "input" not found... :oops:

Re: Show/Hide html code

Posted: 13 Nov 2017, 16:07
by aimeos
Are you using a Blade template? if yes, have you tried "\Input" instead? Might be a namespacing issue in this case.

If you are using the standard Aimeos PHP template engine, you have to use "$this->param( 'f_catid' )" instead.