How can i override the default magento cms homepage entry with a custom module? - magento

I am currently attempting to use a custom module as the first page when you hit the magento installation, i currently have {{block type="namespace_module/block" template"path/to/template.phtml"}} located within the home page cms entry, but unfortunately it is not calling the template or the module which i am requesting, i am now looking at trying to find out if its possible to use a custom module (controlled by indexController.php) to take precidence over the cms home page entry.
This has two reasons behind it, reason 1, it will give me more flexibility for me to extend the index page, and 2, it will allow me more flexibility over css/js which i want to include on that specific page.
If anyone knows of a solution to getting a custom module to take precidence over the cms home page it would be a huge help to myself and the community at large as many people are un-aware of how this is achieved.
Thanks for any assistance provided.
Ryan

If you have a custom controller then put it's frontname/controller/action path in System > Configuration > Web > Default Pages > Default Web URL.

Related

Magento home page

I am working with a Magento install that I did not set up and am pretty green when it comes to its operation... There is a default page serving as the "home page" when there is already a page defined in the back-end as the "home page". The path in the URL reads as: DOMAIN/index.php but when I try to find said index file using google developer mode, I can find no such file that would generate the layout. I suppose I just don't have enough overall knowledge to figure out what is at work here. Can someone help me figure out why it's using the default home page instead of mine?
On most webshops I've worked on the CMS home page wasn't really used. Instead of the CMS home it can be easier to use a custom template to setup the homepage with static blocks and what not.
If this is also the case for you, there might be two places you can find this custom template:
In the layout xml files, search forcms_index_index?
In backend, navigate to the CMS home page and go to the Design tab
About the index.php part: this is because you probably because you haven't enabled mod_rewrite in your server configuration

Add static javascript to every page of joomla

Im completely new to Joomla development. I need to develop Joomla plugin that adds static javascript to the footer of all the pages of a Joomla site. Also, the plugin would need to save 2 fields in database, and access these fields on per page basis. Also, Admin panel is needed.
Now, my questoion is, where do i start? Joomla plugin development is a big task, so if I can get some pointers as to where to start, it would be very supporting.
Im not asking for direct code, but just the right direction to start.
Thanx in advance....
Joomla has three types of extensions (what you refered to as plugin): components, modules and plugins, where each has a different purpose.
If you need to add javascript to all pages, the best place is your template. If you don't have access to template, just building an extension, then you have to create a content plugin.
If you need to create extension with admin panel which also works with database, you need to create a component. The best place to get started is tutorial Developing a MVC component for Joomla 2.5

File location of phtml file of backend admin page

I installed an extension to add custom fields to customer registration form.I want to add some option value in dropdown menu box of input validation in backend admin page..could you plz tell me the path of the folder where can I find the phtml file which is responsible for that part ?
-Thanks.
The files you are looking for are in:
app/design/adminhtml/default/default/template
But just changing the .phtml file won't do the job. The customer model itself should be extended to provide for your extra field. Therefore i highly recommend you to write a module for this instead of altering Magento core code. This to make sure that you can still use updates in the future.
Writing such an module requires more in depth knowledge of Magento. For more information on custom adminhtml see here.
For information on extending the core functionality look here.
If you don't feel like programming this all yourself take a look at customer attribute modules on Magento Connect.

Magento Multi Store themes calling same login.phtml file

I'm new to magento. Currently i'm developing two ecommerce sites using multi-store option in magento. Both the sites are 90% over, last night when i planned to customize the login page i was shocked. The reason is the changes made in first store login page also reflecting in second store also. The login page is curently calling from
frontend/default/default/template/persistent/customer/form/login.phtml
Is it possible to give any custom login page? PLz guide me magento experts......
Please update your post with your frontend/ folder structure down to each theme template folder. It might be that you don't have a copy of login.phtml in the second theme. Moreover you should follow templates best practices as:
Always create for a new shop different packaga. So not
frontend/default
but
frontend/yourcustompackage
Always have default theme left as much untouched, as possible. So in the
frontend/package/default
Should be some basic changes and rules of your package. It means for example in the putting reset.css for all of your themes. Or something like this.
As for me, each store view should have own theme. So, for example, storeview1
frontend/package/storeview1/
There you copy and change files specific for this theme. So, for example, in default you might have login.phtml. But you want storeview1 to have another login.phtml and in storeview2 it should be the same as in default. Therefore you copy the login.phtml from default to storeview1 and change it there. Don't forget to change package and theme in System->Configuration->Design. Package should be change for whole shop and theme should be specified for every store view or left untouched for default.
P.S. Magento theme fallbacks
P.P.S. Try this tutorial or google another one
P.P.P.S. I hope, you got the answer for your question.

In a custom Joomla! template, how can I determine whether I am on the home page?

I am trying to create a custom template, but I want the template to look a little different for my Joomla! homepage/frontpage. Is there a easy boolean-type expression I can use to determine whether I am on my site's homepage?
That way, I can just say if ($on_homepage) { [custom homepage html] } else { [regular template] }
Thanks in advance!
You can create a separate template for your homepage. More details here.
This is very easy, just create 2 templates. One for your homepage and one for the rest of your site. Then install both, make sure you give them a descriptive name in their xml file so you know the difference.
Once they are installed you can set a default template that would be site wide. Then choose/click on your homepage template and it's options will load up. On the bottom left you can select the menu items where this template will be visible. This setup is very much like the way in which you define where modules are shown.

Resources