-
Notifications
You must be signed in to change notification settings - Fork 1
07_Changing Admin URL
The SITE_AREA is the location of your admin interface within your website. By default, all of Bonfire’s Contexts are available by visiting http://example.com/admin/. In this case the Site Area is admin. It is the URL that all of your contexts are made available under.
Since the original intent of Bonfire was to create an admin area for your web applications, the admin site area made perfect sense. As other developers started using Bonfire, though, new ways of structuring apps became apparent. Site Areas were implemented to make these new types of app organization make more sense.
Changing the site area for you app is as easy as changing a single constant.
Open the bonfire/application/config/constants.php file. 2. Edit the SITE_AREA constant to match your needs.
/*
The 'App Area' allows you to specify the base folder used for all of
the contexts in the app. By default, this is set to '/admin', but this
does not make sense for all applications.
*/
define('SITE_AREA', 'admin');When you need to create a link within your modules to an admin page you should use the SITE_AREA constant in your link.
<a href="<?php echo site_url(SITE_AREA .'/my_link') ?>">My Link</a>Getting Started With Bonfire
Installing Bonfire
Change Log
Bonfire Models
Bonfire Migrations
Bonfire Controllers
Contexts
Layouts and Views
Working With Assets
Changing Admin URL
Global Helpers
Keyboard Shortcuts
Module Builder
System Events
Performance Tips
How to Contribute
API Documentation Guidelines
Bonfire Guides Guidelines
Bonfire Bug Report Guide