CI bonfire + can't view the module at public context - codeigniter

My Public contet URL is http://localhost:8080/bonfire/. I have created a blog module and checked Public in Contexts Required cheked list. I saw all the files have been created inside the module. I can only view the module in the admin section. If I navigate to http://localhost:8080/bonfire/blog I will get 404 error. I already fixed my .htaccess base path RewriteBase /bonfire/. Please help me to fix this. Thanks!

If you have followed well the tutorial:
http://cibonfire.com/docs/developer/tut_blog
It won't be wrong.
If you already saw your Blog in the context menu at admin side (under: Content menu)
Please have a look again on above tutorial at "The Public Context"
You should have a class for front-end:
class Blog extends Front_Controller
If you do not see your Blog in the context menu at the admin side, it's likely you forget to run migration: Developer / Database / Migrations

Related

Broadleaf - Extending DemoSite Admin - Add new Menu and Page

I have been looking into Broadleaf since last couple of days. I have managed to run it on local tomcat with MySql. I have extended Entity for my custom requirement following Broadleaf's documentation.
Now I want to add a menu option (in left menu) in admin. I have no clue from where Broadleaf admin site displays the web page. How left menu is displayed ? How data from controller are binding with view ?
For example, if you access product page in broadleaf admin section, then URL will be http://localhost:8081/admin/product/. Following it I managed to know that it calls AdminProductController.java of framework's admin module. I looked at the code of AdminProductController.java but didn't get a clue how data is being forwarded to view. Also didn't find the product jsp/template/html.
I guess admin module is using EntityForm.java for view. If I intend to use simple jstl then is it possible?
My question how easily I can extend admin of Heat Clinic demo site to add new pages, menu items etc? If anyone has customized/extended demosite admin then please suggest.
We have some docs on how to do this at http://www.broadleafcommerce.com/docs/core/current/broadleaf-concepts/admin/admin-custom-controllers. The bottom line here is that if you want to add a new page then you can simply use normal Spring MVC as you would on the frontend. The only difference is that there are some specific ways to place new template files (which is documented on that page).
To answer your question, most URLs in the admin are handled dynamically by the AdminBasicEntityController. Most of the sections are handled generically by this controller but there are still certain instances where we needed to override things specifically, like with AdminProductController.
Also, the admin is built with Thymeleaf and not JSPs so if you want to add more pages they will need to be done with Thymeleaf.

Overriding Joomla core component file

I am trying to override the com_content/views/article/view.html.php file in joomla using the instructions given in this page
It says I have to create a folder named 'code' in base directory and create the same directory structure. I tried it , but its not working. Can someone confirm whether its working.
Where should I create code folder? Is it on root of joomla installations?
PS- The edit is working correctly when applied on core file
You can override (nearly) any class in Joomla, if your class with the same name is loaded first. To ensure that, you need to create a system plugin.
Here is an example for root/components/com_content/views/article/view.html.php:
class plgSystemOverride extends JPlugin
{
public function onAfterRoute()
{
JLoader::register('ContentViewArticle', 'path/to/override.php', true);
}
}
CAVEAT: Overriding a core class can lead to problems with other extensions, if you're not very careful. For views, though, any interferrence with other extensions is less likely.
You can't override component controllers, models and views in core Joomla! without using a 3rd party plugin.
The plugin you need can be found here: http://extensions.joomla.org/extensions/style-a-design/templating/15611
The code folder then goes into your Joomla root unless you're overriding a back-end view in which case it goes into /administrator
Hope this helps :)
You can use the Class Overrider Plugin http://extensions.joomla.org/extensions/tools/development-tools/23994
just adding some simple human reading commands

how can i get my login page in area?

I have 2 areas in my project: Admins , Members
and I have Login.csthml in view folder.
Therefor,its Address is:
http:localhost.com:5555/Areas/Members/view/Login.cshtml
I want to create the text link "login" at home page of my site ,
when i click on it, it should go to login page that i said above.
i use this code:
#Html.Action("Login", "Members")
but , it doesnt know it should go to Members Area, and it throws an error:
{"The view 'Login' or its master was not found or no view engine
supports the searched locations. The following locations were
searched:\r\n~/Views/Members/Login.aspx\r\n~/Views/Members/Login.ascx\r\n~/Views/Shared/Login.aspx\r\n~/Views/Shared/Login.ascx\r\n~/Views/Members/Login.cshtml\r\n~/Views/Members/Login.vbhtml\r\n~/Views/Shared/Login.cshtml\r\n~/Views/Shared/Login.vbhtml"}
what should i do?
Do you have the area registeration on the Global.asax? When adding an area by right-clicking on the project and using the wizard all the coding for that is done automatically.
Also the address you posted is not correct... it should be something like http: localhost:[port]/[AreaName]/Members/Login
try using this url form to see if the routing is working or not

Overriding magento cms controller for noRoute action

I'm looking for example of overriding cms controller for noRoute action. I'm trying to make my 404 page send me an email when it happens.
I have followed this tutorial and did everything exactly as written but nothing happens.
I googled some more and found this which also doesen't work for me.
My Magento version is 1.5.0.0-rc1.
Could anyone give me any link to some tutorial or example code? Thank you very much!
I've did some try/error research and managed to create my module. After a lot of search I found that Magento uses custom No-route controller for 404 pages (this page is GOLD: http://alanstorm.com/magentos_many_404_pages). This can be set as following:
Under "System -> Configuration -> Web -> Default Pages" I've changed the setting for Default No-route URL which now points to my custom made controller.
I've basically copied contents from the existing CMS IndexController and added my own logic (sending email and showing search form). That's it, it works form me.
Thanks to everyone.
mXperts skuroute extension - get it and edit the controller.
http://www.magentocommerce.com/magento-connect/mxperts/extension/1749/mxperts-skuroute

Magento - local controller is not working

I have a question regarding Magento's local directory.
I am trying to override a core controller - Mage/Contacts/controllers/IndexController.php.
So I copied IndexController.php to /app/local/Mage/Contacts/controllers/
but Magento is still using core file. I can confirm it because I see 404 page when I rename Mage/Contacts/controllers/IndexController.php to IndexController.php_.
Please advise me.
Thanks!
Copying a controller into the app/code/local path doesn't work unfortunately due to Magento's autoload architecture. It does work with Blocks, Models and other objects, but not controllers.
There is a detailed walkthrough of how to override a controller on the wiki. And a blog post by #prattski
Try following those, then come back with any specific questions.
HTH,
JD

Resources