I am converting a module from Magento 1 to 2. The plugin settings are in the store > configuration menu (etc/adminhtml/system.xml) and they have images displaying in the Magento 1 module in CDATA tags in the comments.
My question, where do I put these images in Magento 2, so that I can call them after compilation. From what I am reading, my images should end up in pub/static/admin or something like that. What location should I put them in and do I need to do anything else, like register them via .xml?
My module is in the app/code/... folder, here is a screen shot of what I am trying to accomplish:
In your module folder you should put the image under view/adminhtml/web/images folder, the route should be:
app/code/Namespace/Module/view/adminhtml/web/images/image.jpg
after that make sure you run the command:
php bin/magento setup:static-content:deploy --area adminhtml
and in your template.phtml you could get the image with something like this
$block->getViewFileUrl('images/image.jpg');
Hope it helps!
Related
I have added a product from magento admin and uploaded image for that product. Images are showing in backend but not showing in frontend.
I found that the image cache folder for thumbnail,base and small is not created under pub/media folder.So that images are not showing.
I have tried all the magento possible command to fix this but no luck.
Did you check the permission on the folder? The current php user has to have the right to write inside the folder.
I am using ionic-cli 2 for generating pages for my ionic project. I would like keep my pages separately in different folders . For example , I would like to keep pages like Login , Signup in a separate folder called authentication . But at the same time I would like to enjoy the ionic generate page command to quickly setup the page inside the authentication folder. Currently ionic-cli would generate the pages in pages folder. How can I make it in pages/authentication folder ?
I know it's been a while, but this worked for me using the #latest ionic (3.12.0)
Generate "sub-pages" from the app's root folder as you would generate "top-level" pages. Then, drag them to their intended place using Visual Studio Code.
Obviously you want to rename stuff such as modules and classes. For example, for the 'home' and 'standings' sub-pages of the 'team' page, I renamed the classes from HomePage and StandingsPage to TeamHomePage and TeamStandingsPage respectively.
Alternatively (and in retrospect recommended), name the pages using the desired structure, e.g., ionic generate page team-home (you'll still have to move them manually). This is especially useful for repeating patterns, e.g., if you also want 'home' and 'standings' sub-pages for say a 'tournaments' page.
Also see Can ionic2's pages support nested directory structure?.
Just run
ionic generate page pages/authentication
more information https://ionicframework.com/docs/cli/commands/generate
ionic g page src/app/pages/{your_pageName}
This Worked for me.
Reading the doc https://ionicframework.com/docs/cli/commands/generate
Seems that you can specify the folder where you want to generate your page or component directly when you call the command.
Typing ionic g page my_dir/my_page generate a page component into the my_dir directory.
I know this gets tricky in the beginning. Here, I'm mentioning the steps to create a page under specific directory.
Suppose your project follows the structure of directory as:
src
app
components
pages
pipes
To create a page under "pages", navigate to "app" directory and use command:
ionic g page pages/test
Reference: https://ionicframework.com/docs/cli/commands/generate
before creating a separate folder you have to manually create an authentication folder into your app folder.
CLI > ionic generate page authentication/login
Am just beginning with joomla on a site that is already existing and was previously managed by someone else who is not available at the moment. I am trying to troubleshoot a problem why the website is displaying the header differently in different PCs but I am not being able to find the image of that header file. I tried to look for it under "site > media" but cannot find the image among the images in that area. I also tried to look for the path to the image through the template css and found this path ../images/logo.png which I believe must be the path to the header image but I honestly don't really know which path ../images/logo.png is but assuming it is the one under "media" then I still cannot find the image. Could you give me a clue on where the header image files could be found cause I've actually still failed? Or, could you make me understand this path ../images/logo.png or how to find an image on a joomla admin interface like say "logo.png". In fact I discover that on looking at the CSS for the template, the image paths found in it are not found in "Media"? Is there another path for the images in the template and how do I access them? I cannot FTP my host at the moment to view the physical files due to the long procedure needed so am hoping that there is a way to find it. I only have joomla admin access and nothing like Cpanel as yet. The joomla version of the site is 1.5.22 which I know is an old one but I plan to do first things first. Hope I've given enough infor.
Try using FireBug, or Chrome debugger - (press F12) and check "Click an element in the page to inspect" to see where the specific image is located exactly.
I am using Magento 1.7.1 and find that magento has automatically added ugly urls like www.afd.com/catalog/product/view/id/2728/name.html.
When I go into catalog > URL Rewrite, I see the target paths for all my products listed in the above totally unfriendly way with id numbers displaying.
How do I fix this en masse?
Thanks.
-TM
Try to do it by using a .csv file. You can create a php file which will run outside your project and do the expected changes via a csv file. Also hopes this will help to grab an idea. http://www.solvingmagento.com/magento-url-rewrites/
Refresh all indexes in magento, here is instrucion http://www.inmotionhosting.com/support/edu/magento/102-customizing-magento/how-to-reindex-your-magento-website, then flush all cache. Then magento should use Url Rewrites. If doesn't work make sure that you heve proper settings in
System->Configuration->Web->Search Engine Optimization
I want to do some changes in magento theme actually product detail page, but I am unable to find that what theme it is. There are 4 directories where files can be.
In app/design there are 2 directories, default and base and then further more
And same is hierarchy in skin folder
So is there some place where I can see that which files are being used or is there some variables or functions in magento that I can use to check that from where it is getting file. I don't know much about magento and zend framework. I tried to echo some content in product_controller but it seems that I am not printing output in write file. So what can be the way for me to know that where is the file of product detail page view where I can add a form and some link, is there any sort of custom HTML in magento that I can add in product detail page? I actually want to have a form in it that will take it to anohter page that I will create in magento and that page will use some data from form. Or if there is some extension for it?
Please tell if you know any thing about it , that is really appreciated.
thanks
You can find out where your themes set from
System > Configuration > Design
System > Design
turn on template hints from System > Configuration > Developer
or you can add print_r(get_included_files()); to the end of index.php to see what files are actually used in current php page
You can find out which is set from following place
System > Configuration > Design
System > Design
here you can see the name of theme who layout,templates and skin is used
then u can explore the folder having the same name as files from that folder are in use.