Show/Hide html code

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Bevi
Posts: 33
Joined: 25 Sep 2017, 20:57

Show/Hide html code

Post by Bevi » 10 Nov 2017, 17:42

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?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Show/Hide html code

Post by aimeos » 12 Nov 2017, 11:27

It's better to use the category codes as they usually don't change
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Bevi
Posts: 33
Joined: 25 Sep 2017, 20:57

Re: Show/Hide html code

Post by Bevi » 13 Nov 2017, 12:33

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:

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Show/Hide html code

Post by aimeos » 13 Nov 2017, 16:07

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply