Fuel constants not working.

I was trying this layout experiments from here http://docs.getfuelcms.com/general/layouts

to create home layout i created just as they say in this location -> fuel/application/libraries/_layouts/Home_layout.php

To make this Home_layout.php you need require_once('Fuel_layout.php');
But the problem is Fuel_layout file is not loading because its not in the same directory.
Home_layout.php is in fuel/application/libraries/_layouts/ directory while
Fuel_layout.php is in fuel/modules/fuel/libraries/ directory.

To access Fuel_layout.php I used FUEL_PATH constant. require_once(FUEL_PATH.'/libraries'.'Fuel_layouts.php');
No luck. It throws an error.
Message: require_once(/opt/lampp/htdocs/fuelcms/fuel/application/../../fuel/modules/fuel//librariesFuel_layouts.php): failed to open stream: No such file or directory
It is searching the file inside the application folder. But the file is in modules folder which is outside of the application folder.

If i use only constant It shows the correct path. require_once(/opt/lampp/htdocs/fuelcms/fuel/modules/fuel)

But if I add the second argument to locate the library then it goes to search inside application folder.

I tried all the constants like MODULES_FOLDER, MODULES_PATH, MODULES_WEB_PATH

BUT No luck. second argument always goes to application folder.

How Can I fix this.

Comments

Sign In or Register to comment.