Hi I am new in Magento 2 and I want to know where I have to put the
vendor/magento/module-theme/view/frontend/layout/default.xml file, I tried to copy the file and put it in c:\wamp\www\kk2\app\design\frontend\Magento\MyStore\layout
folder and is not working. I also tried in c:\wamp\www\kk2\app\design\frontend\Magento\MyStore\module-theme\layout and other options but I can't figure where I have to put this to start modifying the theme, the documentation on the Magento offical page is not very clear.
You do not need to copy any file. You can create your own theme.
Quoting steps in create a theme
Create a directory for the theme under app/design/frontend/<your_vendor_name>/<your_theme_name>.
Add a declaration file theme.xml and optionally create etc directory and create a file named view.xml to the theme directory.
Add a composer.json file.
Add registration.php.
Create directories for CSS, JavaScript, images, and fonts. Configure your theme in the Admin
panel.
The Luma theme is not designed to be inherited from. Please see this comment on Github. You can however, inherit from the blank theme as follows:
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>New theme</title> <!-- your theme's name -->
<parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
<media>
<preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
</media>
Create folder and copy default.xml file in your theme
app/design/frontend/magento/<your_theme_name>/magento_theme/layout/default.xml
remove generate folder and run
sudo php -f bin/magento setup:static-content:deploy
It's working
Related
I want to upload my own extension in Magento connect, but i am not able to upload zip file in Magento Connect. While uploading my module error is display " Unable to save version. Disallowed extension release file type. "
Any body have any idea, so please let me know.
Thanks in advance.
Your extension has to be of filetype extension .tgz as this is prescribed in Magento. There are online tools to convert .zip to .tgz like this site.
Also check this manual from Magento about how to package Magento Connect Extensions.
It seems the zip file you have is not a Magento package. You can use the Magento Connect Manager to upload only valid Magento packages containing a package.xml file in the correct format, including the <contents> element containing the extension files.
In the case you have a package.xml file having a structure like this one:
<?xml version="1.0"?>
<package>
<name>...</name>
<version>.</version>
...
<contents>...</contents>
...
</package>
try to recreate the package as a .tgz file by placing the package.xml in the root and the other files in their respective places relatively to the root.
In the case you do not have a package.xml file, I would advise you to consider installing the extension manually by coping its files to their respective places in your Magento installation.
I'm creating Joomla plugin (3.3 version) and I want to add some images to /images/ folder when installing plugin. Is there a way to add them trough manifest file, or I have to create installation file ?
You can definitely add them through the manifest file the same way you add images to components.
<files folder="site">
<folder>images</folder>
</files>
I've become fairly confused when I'm trying to create a subfolder and populate it with things in my plugin manifest XML.
If I want to create a subfolder and at the same time add files to it, how would that be done? Read comments in the code draft (all names are of course more distinct than used here).
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="2.5.0" group="group" method="upgrade">
<name>Handelsbanken Finans Delbetalning</name>
<!-- The following elements are optional and free of formatting conttraints -->
<creationDate>July 2013</creationDate>
<author>Emil Carlsson</author>
<authorUrl>http://valid.url</authorUrl>
<copyright>Copyright (C) 2013</copyright>
<version status="BETA">0.0.1</version>
<!-- The description is optional and defaults to the name -->
<description>Plugin description.</description>
<update> <!-- Runs on update; New in 1.6 -->
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>
<!-- Site Main File Copy Section -->
<!-- Note the folder attribute: This attribute describes the folder
to copy FROM in the package to install therefore files copied
in this section are copied from /site/ in the package -->
<files folder="site">
<filename>plgName.xml</filename>
<filename>plgName.php</filename>
<folder>helpers</folder>
</files>
</extension>
This gives me nothing really. I can't find the folder I shouldhave been created from what I gathered from the documentation. It also doesn't specifies how I populate these folder :(. I am assuming that it is possible to more or less just package all files I want and then it will create the subfolders where I want/need them. But that it is a question of how to write the manifest file. If anyone have a good tutorial about this I would be very thankful :). I've googled until my fingers are almost at the Point of bleeding :(. I guess I could put all the files in the same folder, but I want to have some sort of structure to visualize for other developers what's part of the core of the plugin and what's not part of the plugin core.
Problem is solved. In my not installation script I linked in the files for what I thought only was used by the configuration XML (a field to configurate the plugin). In this file I had the node "files" as well, in this node I'd not linked in the helpers directory. When this was done all the subdirectories was added as well. So in short - Don't forget to link in the folder in all places where you have a files-node.
I've created a joomla templates. As instructed I have placed my files and folders inside and linked to css file in index.php but when I cut up all the text in templateDetails.xml it is still showing as previous in the browsers and also at positions even after doing a clean refresh. Why is it taking its position and css, I'm surprised.
Edit
as per comments I have been placing my templateDetails.xml contents
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.5/template-install.dtd">
<install version="1.5" type="template">
<name>bini7a</name>
<creationDate>Mon, Jun-10, 2013</creationDate>
<author>Bhojendra Rauniyar</author>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<copyright>Bhojendra Rauniyar</copyright>
<license>GNU/GPL</license>
<version>1.0</version>
<description>bini7a: Bhojendra Template</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<folder>images</folder>
<folder>css</folder>
</files>
<positions>
<position>headera1</position>
<position>headera2</position>
<position>mid</position>
<position>headerb1</position>
<position>headerc1</position>
<position>headerd</position>
<position>left</position>
<position>right</position>
</positions>
</install>
But even if I delete all these all the positions work correctly as defined position and also the css
The positions specified within Joomla's templateDetails.xml are only really needed when configuring module positions within the administrator's Module Manager. Once the position has been set it would appear the templateDetails.xml file does not need to be referenced again to display the module in that requested position.
To remove these positions permanently, either uninstall the template and reinstall with the new XML file or (the better) remove the positions from the template's index.php file.
You're looking for JDoc statements like the below:
<jdoc:include type="modules" name="headera1" />
See http://docs.joomla.org/Jdoc_statements for more information on the JDoc statements.
I hope this helps solve your dilemma.
I create one template for joomla 2.5. But when I installed it it show the error:
"Failed loading XML file
D:\wamp\www\demoproject\tmp\install_51a44308e27b9\templateDetails.xml
XML: XML declaration allowed only at the start of the document
JInstaller: :Install: Cannot find Joomla XML setup file"
How can I solve it please?
It means your XML file isn't properly written. The actual error is:
XML declaration allowed only at the start of the document
Check the file and make sure
<?xml version="1.0" encoding="utf-8"?>
is the first line in the file. No line breaks or anything else is allowed before this.
That means you try to install the wrong .zip file. It happens often if you try to install a Joomla 1.5 template to a Joomla 1.6 website or the other way around.
Another common reason is, that you try to install the templates download package (<- the ZIP Archive with all the template stuff inside, like the psd file, the docs AND the installation files) , instead of the included installation file.
<extension version="2.5" type="template" client="site"> Try extension tag instead install.
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd"> Include the correct doc type.