Liferay 6.1: Custom theme not inheriting from "Classic" theme - themes

I've created a new theme using the Liferay Eclipse IDE and have modified build.xml to change the theme.parent to classic. Here is my complete build.xml file:
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="deep-blue-theme" basedir="." default="deploy">
<import file="../build-common-theme.xml" />
<property name="theme.parent" value="classic" />
</project>
I'm not seeing any change in the theme. I still see the _styled layout being displayed. Is there anything else I need to do?

No, changing the value of the "theme.parent" property in build.xml to "classic" should be enough.
But note that classic theme doesn't contain files such as custom.css which you could easily replace "to override default styles in one central location for easier upgrade and maintenance". If you want to save all styles in the classic theme, I see two possibilities:
First approach
Copy custom.css from classic theme to "docroot/_diffs/css" folder in your project.
Then add your styles to the end of that file.
Second approach
Create custom_deep_blue.css file in your project. Here you will add your styles.
Copy main.css from classic theme to "docroot/_diffs/css" folder.
Add the following #import to the end of the main.css file:
#import url(custom_deep_blue.css);

Related

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

Maven site documentation: Add links to additional documents

I want to generate project documentations with the Maven site plugin. The default layout, structure and functions with "Project Information" and "Project Reports" is ok for me.
But I want to add an additional (third) section "Additional Documentation", which links to some more documents, if there are such documents in the project.
I can create a directory src/site/resources/otherDocu and the documents will be copied to the target/site/otherDocu directory, as desired. However, the generated site does not link to them.
I would like a third section "Additional Documentation", which lists and links the files in the mentioned directory. I want to do this with as small an overhead as possible. Specifically, if it can be avoided, I do not want to include an own site.xml, along with css etc. as described in many solutions. How can I use the default site configuration and only "inject" a part? Or, if this is the only way, it should be possible to configure a file (say site.xml) only once in a parent POM and inherit it for all other projects. How can I make it list the files found in src/site/resources/otherDocu and display links to them?
Or, what I also was thinking of: I could write an own report plugin, which does this, and then I only need to specify this plugin in the "reporting / plugins" section in the POM, as I did for the other reporting plugins. With this solution, I could probably create an additional entry in the "Project Reports" section, like for every other reporting plugin, which is a step in the correct direction. But I need several entries (because of several linked documents), or one entry "Additional docu" with sub-entries.
Which way is the easier to go? Does you have a recommendation or a similar solution? Does anyone have a file (site.xml or similar) which already does some listing, does not need all other resources (images etc.) and can be inherited?
This is what I have done .. relatively straightforward:
src/site/site.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="${project.name}">
<body>
<menu name="Menu Title">
<item name="Documentation" href="docs.html"/>
</menu>
</body>
</project>
Above creates a link to docs.html page. Then create the docs page using apt (or other languages possible)
src/site/apt/docs.apt:
-------------
Documentation
-------------
Documentation
Some text {{{/path/to/doc}document}}.
If you don't want to create a separate page, you can probably just insert links to the documents in the site.xml.
The first thing to keep the default behaviour is to use something in your site descriptor:
<body>
<menu ref="reports"/>
<menu ref="modules"/>
</body>
The thing you are using to automatically copying the files to the target is suposed for resources as you can read in the docs.
Furthermore to automatically created documents you need to go the way via a report plugin.

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.

Where to Store NopCommerce Custom Theme/Views?

I'm new to ModX and have Experirnce with MVC3. I have a PSD that im coding into HTML and CSS. When I open the NopCommerce solution in Visual Studio, I see the themese folder. Is that where my custom theme assets should be saved?
After building the solution, do I need to run the prepare and deploy batches and copy deploy folder contents in order for changes to take effect?
Finally, where in the source code do I change Manufacturers to Restaurants?
Thanks for your help.
Themes go in Nop.Web.Themes. Create a folder there named after your theme and include your Content and Views folders. You should also have a theme.config XML file in your folder like this:
<?xml version="1.0" encoding="utf-8" ?>
<Theme title="YOURNAME"
supportRTL="false"
previewImageUrl="~/Themes/YOURNAME/preview.png"
previewText="YOURDESCRIPTION">
</Theme>
If your site is already running, you should be able to just move your Theme folder to it for changes to take effect.

How to add icon on Customize Toolbar?

I am trying to add a button on the Customize Tool Window on Firefox 4
My folders look like this:
addon
|- content
|- om
|- xul
|- browser.xul
|- browser.css
|- skin
|- default
|- icon.png
My chrome.manifest file:
content orkutmanager content/om/
content orkutmanager content/om/ contentaccessible=yes
skin orkutmanager default skin/default/
locale orkutmanager en-US locale/en-US/
overlay chrome://global/content/browser.xul chrome://orkutmanager/content/xul/browser.xul
My browser.xul file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="chrome://orkutmanager/content/xul/browser.css"?>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="orkutmanager-button" label="OM"
class="toolbarbutton-1 chromeclass-toolbar-additional"
tooltiptext="Orkut Manager"/>
</toolbarpalette>
</overlay>
Accessing chrome://orkutmanager/content/xul/browser.xul gets me to a blank page, which means the file was found. (Should something be rendered?).
Accessing chrome://global/content/browser.xul gets me to an error page:
Firefox can't find the file at jar:file:///C:/Program Files (x86)/Mozilla Firefox 4.0 Beta 7/omni.jar!/chrome/toolkit/content/global/browser.xul
Isn't this file supposed to exist? Did it move? How can I add an icon on the Customize Toolbar window?
Apparently I should post this as an answer for accepting:
http://forums.mozillazine.org/viewtopic.php?f=38&t=934345
seems to demonstrate roughly the problem you are looking at. However, you commented that this was not correct entirely, but that it did lead to you finding the problem which was the inclusion of the filename in a different place.
For others fighting the same problem, ensure that all the new paths are up to date.
Thanks.
Instead of chrome://global/content/browser.xul it is chrome://browser/content/browser.xul.
I found a page, here, where it is explains very well how to achieve this.
In another documentation page, I found:
The CSS file with your toolbar styles
needs to be included in the overlay
file, as you would expect, but also in
the chrome.manifest file. This is very
important because the toolbar
customization dialog won't work
correctly without this. The way to
include the file in the manifest is to
add this line:
style chrome://global/content/customizeToolbar.xul chrome://xulschoolhello/skin/toolbar.css
The documentation is very messy, I was looking at one about Firefox 1.5 when I copied the url. :S

Resources