breadcrumb.phtml file path? - magento

I am still trying to understand the themeing engine of magento by studying a theme. im my theme there is breadcrumb pthml file in templates/page/html folder which manipulates the bradcrumbs. How does magento know about the file? does the page/html folder is standard.
and what is the role of the
files do in page.xml

The template system in magento consists of
• XML layout configuration
• PHP template files
• PHP block classes
All layout XML files will be found in the app/design/frontend/<interface>/<theme>/layout folder.
All template files will be in the .phtml files found in various folders under the app/design/frontend/<interface>/<theme>/template folder.
All blocks will be in the app/code/<core,local,community>/<namespace>/<module>/Block folder.
You may not find all the layout/template files in same theme say telescope. For example, Magento will check the following folders, in order, for a file named catalog.xml:
app/design/frontend/interface/telescope/layout/
app/design/frontend/interface/default/layout/
app/design/frontend/base/default/layout/

Breadcrumbs template file will be under your current theme.
for example:
app/design/frontend/<pkg>/<theme>/template/page/html/breadcrumbs.phtml
If its not present in current theme then it will be in base theme
app/design/frontend/base/default/template/page/html/breadcrumbs.phtml
Magento template engine first looks block/page template in active theme if not found the will look in base theme.

this is handled by layout handlers and block descriptions so if you are new in business head to magento knowledgebase and read theming tutorials there
app/design/frontend/base/default/layout/page.xml:82: <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>

Related

designing layout of magento 2 theme

I am new to Magento.
I am creating Magenta 2 site, I have managed to install Magento, and for it to use the luma theme.
I want to be able to edit the theme (through Inheritance), I understand it uses XML files to design the layout, how do I change these, should they be in the new theme folder, and change them there?
If so, where do I get the origonal Luma xml files, or does magento create these? - There are no themes within the app/ folder, is it here where I create the new theme (that inherits from Luma)?
Many thanks for any help, I am completely new to Magento.
You have to create a custom theme and make theme.xml and set a parent to LUMA.
Now app/design/frontend/customthemename
So anything that you want to customized used in customthemename folder
Thanks
You should create a child theme to edit XML file. To create a child theme, there are 3 steps to do:
Firstly, create a new theme directory in app/design/frontend.
Secondly, declare the new theme by:
Creating theme.xml: this file identifies the name, parent and other
basic info of the new theme.
Creating Composer.json: this file is used to install the theme via Composer later.
Creating registration.php: this file is required in any Magento 2 Extension
and Themes.
Creating static files directories: this folder is used to store CSS, JS, image files.
Creating logo folder: this folder contains files that determine the location and size of your new theme logo.
Thirdly, apply and configure theme in admin: - Run Upgrade Command. - Apply the theme. - Deploy.
For more detailed tutorial, go to Guide to create Magento 2 theme.
The original XML files of any module and themes are located in vendor/magento//view/frontend/layout, with the module_name is the module related to the XML file you want to edit.
For example, with homepage CMS, the XML file is located in vendor/magento/module-cms/view/frontend/layout

How to add Magento extension in other theme except default

I want to add extension - All Category Product Carousel in my Magento Website and it has RWD theme.The components of the extension are by default installing in:
app/design/frontend/default/default/layout
app/design/frontend/default/default/template
skin/frontend/default/default
I have moved the components in my theme folder i.e. RWD, and components are now in the following folders:
app/design/frontend/rwd/default/layout
app/design/frontend/rwd/default/template
skin/frontend/rwd/default
But after this also the extension is not working. I am new to Magento so does not know much things about it. Does anything else be done?
The products are there but css and js is not getting applied on them. The data is showing like: Please View Here
You can paste your extension key here. Now you can check if you have copied all the files to RWD.
The extension tell to insert below block in cms page. Include it in your cms->home page.
{{block type="pcarousel/pcarousel" pcarousel_id="carousel id" template="pcarousel/pcarousel.phtml"}}
After that navigate to system->permission->blocks->Add new block and add the type pcarousel/pcarousel there and allow it.
The css and js files were not loading in the main page, have added them externally. Now working

Magento 2 Copying Template/View Files from Luma into My own Theme

I have created a new Magento 2 theme and added it's parent as LUMA.
It's all working fine but I want to change the layout of my theme and the templates too.
Under Vendor ... I can see that there's all the folders and templates used in LUMA.
I work like to take a copy of all the LUMA view templates and layouts and copy them for use on my theme.
My question is ...
What do I copy and from where?
And where do I place them templates, views etc ?
Below is the reference for theme integration in magento 2:
http://blog.magestore.com/how-to-create-custom-theme-on-magento-2-part-1/
To copy luma,blank theme or module templates, layout and web files to own custom theme
1) To Copy template file:
vendor/magento/module-catalog/view/frontend/templates/product/list.phtml
Follow this path
app/design/frontend/Vendor/theme/Magento_Catalog/templates/product/list.phtml
2) To Copy layout file:
vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml
Follow this path
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml

Magento: Howto overwrite one template file

There is this template file:
app/design/frontend/base/default/template/catalog/product/view.phtml
I first just changed it but I learned I should have made an overwrite somehow to avoid problems with updates. So I tried to find a tutorial for that but like this question I could not find any that works with Magento 1.7.0.2.
I know I have to create a new template folder and recreate the folder structure catalog/product.
But where do I place this folder?
How do I tell Magento to use it?
Can I somehow skip the xml config stuff?
Create a folder app/design/frontend/mycompany/default/template
Then you should can configure this so called new package/theme in the backend
System -> Configuration -> Design -> Package = mycompany
Themes: default (no change should be necessary)
Now your shop uses a completely new theme: yours! But all files that are not defined in your theme will be pulled from base/default (fallback)
To overwrite a template simply copy it to mycompany/default(with same directory structure, so: app/design/frontend/mycompany/default/template/catalog/product/view.phtml) and change whatever you have to change
There should be no need to create any XML files in the layout folder of your theme. In case you need to customize anything with the layout definitions, create a layout/local.xml and make layout updates there. Do not copy for example catalog.xml from the base/default to your theme as this can cause problems with a Magento update.
You should have defined your own theme and copied the exact path and file to your own theme and change it there.
if you want to use the same file the you can copy and paste from default theme to your theme.
But if you want to use your define file then you can use below code in local.xml
and put the newly created file in template folder of your or default theme.
<catalog_product_view>
<reference name="product.info">
<action method="setTemplate"><template>yourfolder/customfile.phtml</template></action>
</reference>
<catalog_product_view>
So above file will override default view.phtml
I hope this will help you.

What's the difference between a Magento theme and a Magento skin?

What's the difference between a Magento theme and a Magento skin? What's the relationshiop between these and a Magento module?
A theme is any combination of layout, template, locale and/or skin file(s) that create the visual experience...
A theme consists of any or all of the following:
Layout (located in app/design/frontend/your_interface/your_theme/layout/)
These are basic XML files that define block structure for different pages as well as control META information and page encoding.For in-depth look into layouts, read Intro to Layouts)
Templates (located in app/design/frontend/your_interface/your_theme/template/)
These are PHTML files that contain (X)HTML markups and any necessary PHP tags to create logic for visual presentation.
Locale (located in app/design/frontend/your_interface/your_theme/locale/)
These are simple text documents organized on a per language basis that contain translations for store copy.
Skins (located in skin/frontend/your_interface/your_theme/)
These are block-specific Javascript and CSS and image files that compliment your (X)HTML.
Source: http://www.magentocommerce.com/design_guide/articles/magento-design-terminologies4

Resources