I am having some hard times trying to figure out what file on my server is creating the page located at "http://www.website.com/component/users/?view=login" I don't have a component directory but I do have a components directory. I dove into that and checked out the com_users/views templates but I wasn't able to edit anything that reflected changes on the page in question really. One thing to note is that if I modify the view.html.php file at 'components/com_users/views/login' it seems to affect the page, and it seems to want to load the content on the page from the line of code that reads:
$menus = $app->getMenu();
Any idea of how to edit this page?
This is the file you will want to edit if you intend on making style or layout changes to the login page.
components/com_users/views/login/tmpl/default_login.php
...
The file that contains the functions for the login page and that I would not recommend editing is:
components/com_users/views/view.html.php
Thanks to GDP for providing the answer I was looking for:
"You may also want to check in the \html folder of your active template. if templates\yourtemplate\html\com_users exists, Joomla will be checking and loading from there if a matching view and file is found."
Related
Having just got myself acquainted (enough) with Magento 1.9, and able to make the customisations required, I've been told that once it's out, we're moving to Magento v2.0.
Having found the differences in the file structure, I believe I can see where to place my code for the custom pages we use, but how can I add this page from my project to a static block for later use?
Previously, the method used was as follows (I realise this may not follow the best practise, but it worked):
Create element folder within theme or core templates directory.
eg. /app/design/frontend/<theme>/default/template/myelement/mypage.phtml
Add this page/element to a static block using the following in the content editor:
{{block type="<theme>/default" template="myelement/mypage.phtml"}}
This block can then be added to the category pages as required.
In Magento 2, I have tried what I believe to be required, which is replicating the file structure and adding phtml files to this, so the template file now resides in:
/app/code/<supplier>/<module>/view/frontend/templates/mypage.phtml
Adding to the content editor the following:
{{block type="<supplier>/<module>" template="mypage.phtml"}}
Unfortunately, this does not display the intended page (element). It doesn't display the calling "{{block" entry either, which usually happens when the line is invalid, so I can only assume that I'm missing something with the link to this template.
If anyone can offer some assistance with this, I would be most grateful.
EDIT:
Continued research on this has led me to the following assumptions:
Magento 2 requires more than just a new .phtml page, even for simple customizations.
I'm still missing something.....
Having gone through 3 different tutorials on creating new modules for Magento 2, each providing slightly different methods, but fundamentally being the same thing, I now have what I believe should be all the code elements to make a new .phtml template for display in a static block.
This has led to an additional problem though.
While I have the required code, I cannot add the module. Adding the module to etc/config.php, as suggested in 2 out of the 3 tutorials, simply crashed M2, both admin and frontend when you try to clear the cache. This is the case after manually clearing cache folders in the var directory.
Also, still unable to add the .phtml template file to a static block or page using content editor.
Not much hair left to pull out here, so looking for help! Thanks in advance
There are a few samples on GitHub, including https://github.com/magento/magento2-samples/tree/master/sample-module-newpage which shows a module adding a new page with a very simple PHTML template file. This example does not use CMS content editing however - it is a sample based on using layout files.
You mentioned you were getting crashes. Would need more details to help on that one. If you got it solved, could you update this question and accept a response to close it out? Thx!
You Should try "class" instead of "type". So your code should look like.
{{block class="<package>\<module>\Block\MyBlock" template="mypage.phtml"}}
You Should try "VenderName_Modulename::myelement/mypage.phtml" instead of "myelement/mypage.phtml". So your code should look like.
{{block class="VenderNameModulename\Block\MyBlock" template="VenderName_Modulename::myelement/mypage.phtml"}}
I am pretty new to Magento and am trying to understand how to create admin (backend) page. I have figured how to create/define the controller and action (along with editing the config.xml).
But now the next problem at hand is to display a simple form in that page. I understand that, I have an option to create blocks and mention the blocks in a layout.xml. But from what I figure is that layout.xml needs to be present in the theme folder. Which I can't do as my magento extension will be installed and I have no access to the user's system.
So the doubt is. How to display a simple from in a backend (admin) page
without having to make any changes to the theme's layout ?
For the admin panel module you don't need to mention the block in the layout.xml of your theme, you only need it to be defined in config.xml file in your "app/code/local///etc/" and a layout file is created in "app/design/adminhtml/default/default/".inside the Block create a folder named "Adminhtml" inside it your can create your form.
Refer this
http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/how_to_create_an_admin_form_module
I would like to override my joomla registration component in the way to have next to it the login form as well. As first step I made in my template folder the registration call but from here I don't know how to include the login form.
thanks
fefe
Is this roughly the idea you're looking for?
http://zebiangroup.markmurphy.ca/component/users/?view=login
If so, I'll be packaging it up as an extension shortly. If you need it asap leave me a message at markmurphy.ca and I'll get in touch.
I'll be back to update this post when I have the extension finished and uploaded.
[Edit:]
I'd hate to leave you totally in the dark and keep you searching for an answer so I'll point you in the right direction.
I was able to write a system plug-in that overrides the user components' controller.php only if that component was the one being requested and if the requested view was for the login or registration and if the task was only to display.
From there I had the new controller.php override the requested view name substituting my own and adding the appropriate models, references and variables to the view.
After that all I had to do was add the layout to my active themes "html" folder under com_users.
When I run my application on localhost I get a directory listing and have to click on 'Index.aspx' to view the page.
I have already set the Set As Start Page to 'Index.aspx', which means when I press 'F5', 'Index.aspx' is opened.
This works fine, but when navigating through the site, if there is a link, such as '/FolderName', I get a directory listing, and have to manually change the URL to '/FolderName/Index.aspx'.
I believe this is because by default, the default page is 'Default.aspx'?
Is it possible to change this to 'Index.aspx'? It would save me a lot of time!
AFAIK this is not configurable. Your best option would be to rename all your index.aspx files to default.aspx. See the following link with an accepted answer to back up mine. Have fun with your renames :)
asp.net application default file Index.aspx
I've copied an existing joomla site from one domain to another, but when I hit the menu items it redirects to the old domain articles. Where is the setting to change this?
Thanks
Narkoz's answer isn't correct, there isn't an option to set your site domain in the joomla backend.
The problem isn't that joomla doesn't know your site URL, it gets that from you server, but rather the menu links are probably hard coded. Check your menu links in the backend and make sure the point to an "internal" link of some kind.
Set $live_site variable in your configuration.php file by adding this line:
$live_site = "http://www.example.com";
Export the database to SQL file then open it with a text editor and do a search/replace
Search : old-site-url.com
and replace it by : new-site-url.com
Save your file and import it to the database.