where to put css in Magento - css

I have a layout.xml file that triggers and runs properly, but my css does not seem to work.
...
<my_handle_name>
<reference name="head">
<action method="addCss">
<stylesheet>css/mystyles.css</stylesheet>
</action>
</reference>
</my_handle_name>
...
EDIT
I have a folder structure something like this,
magento->skin->frontend->enterprise->myfolder->css->mystyles.css
and it appears that magento is looking in
magento->skin->frontend->default->default->css->mystyles.css
how can I edit the layout.xml to go to this directory?

if your other setting is working perfect then you have to set your package name and your myfolder in back end for default configuration if you don't have any store, i assume you have only one default store
then go to this step in Admin
System -> Configuration -> design then set your package name instead of default and also set your theme name instead of default theme
Below is the detail link you can get more idea from it

Custom theme assets belong under the base/default theme. Based on your layout XML, your custom CSS file belongs in skin/frontend/base/default/css/mystyles.css.
Convention is to put your file in a namespaced subfolder to prevent potential collisions with end user files.

Related

In my theme folder ‘sfwd-lms/includes/shortcodes/ld_course_list.php’ file overwrite not working

I'm trying to overwrite my ld_course_list.php file, but I'm having trouble. I tried to use the same plugin folder structure in my child theme, but it did not display the child theme file content.
Plugin Name: LearnDash LMS
Plugin file location : wp-content/plugins/sfwd-lms/includes/shortcodes/ld_course_list.php
Child theme file location : wp-content/themes/Awake/sfwd-lms/ld_course_list.php
The other two locations were also tried:
(1) wp-content/themes/Awake/sfwd-lms/includes/ld_course_list.php
(2) wp-content/themes/Awake/sfwd-lms/includes/shortcodes/ld_course_list.php
Thanks
Overwriting LearnDash plugin files is not as straight forward as woocommerce, they follow a very different folder structure, try this path:
wp-content/themes/Awake/learndash/shortcodes/ld_course_list.php
or
wp-content/themes/Awake/learndash/ld_course_list.php
Unfortunately there is no proper official documentation on this. Check these articles for more info Article 1 | Article 2

Fishpig 3 column layout not working in page/post

Followed these instruction to display a 3 column layout for page/post:
fishpig layout XML.
Used the local.xml of the theme in app/design/frontend/my_theme/default/layout/local.xml
but view is still default 2 column layout.
I have looked into this and tested a few things on your site (you provided access details via email) and found that the code at this link does in fact work. The extension uses the layout handle 'wordpress_{{post_type}}_view' for each different post type. Therefore, for posts, you can change the root template with the following XML:
<wordpress_post_view>
<reference name="root">
<action method="setTemplate"><template>page/3columns.phtml</template></action>
</reference>
</wordpress_post_view>
I have tested this on your site, added it to your theme's local.xml file and refreshed the layout cache. This has correctly changed the root template of your blog posts to the 3 column layout.
For pages, I used the following XML code:
<wordpress_page_view>
<reference name="root">
<action method="setTemplate"><template>page/3columns.phtml</template></action>
</reference>
</wordpress_page_view>
Again, I added this to your local.xml file, refreshed the cache and then your Pages had a 3 column page layout.

How do I override the main template in Plone 3?

I'm working on a theme product for Plone 3.2.3. My theme product works perfectly on the default Plone installation. However, when I apply it to our existing site all the features of my theme are applied except the modifications to the main template.
The product file structure is based on the paster plone3_theme template and the files I've modified are as follows:
my.theme/
my/
theme/
browser/
configure.zcml
templates/
site_actions.pt
...
viewlets.py
viewletmanagers.py
profiles/
default/
viewlets.xml
skins/
my_theme_custom_templates/
main_template.pt
All of the changes I made in the browser/ and profiles/ directories are applied (including custom templates), but the custom main template is not.
You need to make sure, that the my_theme_custom_templates folder is loaded before the plone_templates folder.
Go to http://localhost:8080/PLONE/portal_skins/manage_propertiesForm and check if your my_theme_custom_templates is on the second place in your active skin ("Skin selections"). Usually custom is on the first place, than you need to make sure your skin folders are directly underneath the custom folder or at least before plone_templates. Also check which skin is active in Default skin.

How do I link the logo to an external site?

I would like to change the link in the Plone logo viewlet. By default it points to the Plone site root, I want to point it to a location that is not within the Plone site.
I tried writing a custom logo viewlet, but this seems very complex for such a small change. What is the best way to do this?
The easiest way to change the Logo link is to override the logo viewlet template. This is best done with z3c.jbot.
You need to add z3c.jbot to your projects custom product, by adding it as a dependency in setup.py, and also set up the configure.zcml correctly:
<include package="z3c.jbot" file="meta.zcml" />
<browser:jbot
directory="templates" />
Don't forget to make sure you have the browser prefix added in the <zcml> tag.
You can now copy the logo.pt file from plone.app.layout to the templates directory in your custom product. Rename the file to plone.app.layout.viewlets.logo.pt and change:
tal:attributes="href view/navigation_root_url;
title view/navigation_root_title"
To:
href="http://stackoverflow.com"
Restart the server, and the logo link has now changed.
Alternatively you can edit it via ZMI (/manage) in portal_view_customizations. And search for the "plone.logo" view.
It should open this url in the frame:
/portal_view_customizations/zope.interface.interface-plone.logo/pt_editForm

Magento: Fishpig/Wordpress extension not parsing local.xml on Post pages

So I setup Fishpigs Wordpress extension about a month ago on my Magento site and all was working well. Somewhere, somehow in the last week the formatting went haywire. Tracking down what went wrong, I found that the post pages stopped using my custom .phtml layout ('wordpress.phtml'). All other wordpress related pages use the template properly though.
I had added
<wordpress_default>
<reference name="root">
<action method="setTemplate"><template>page/wordpress.phtml</template></action>
</reference>
</wordpress_default>
in my local.xml and all was good. Today I even tried setting all the layouts in the extension settings and same deal, only the post page isn't rendering the correct layout. This is a strange problem, I'm not sure where to start looking...
I see three possibilities here (assuming you've already performed the holy rite of clearing your cache storage)
The request for the post page isn't loading your local.xml file, possibly because its using a different theme and/or design package
The post page isn't issuing the wordpress_default handle, so although your local.xml file is being included, your setTemplate action is never called
There is a layout update that's called after your layout update (either via XML or directly in PHP code) which sets the root template to something else.
Investigate each of these three items and you should find your answer.
Regarding choice #3, I don't have an installation with the FishPig extension installed and haven't used it extensively, but it looks like the extension does some jiggery pokery in ViewController.php to automatically set the template to page/1column.phtml if the wordpress page object (? I don't know what this is) has a field set to 'onecolumn' or '1column'.
parent::loadLayout($handles, $generateBlocks, $generateXml);
if ($this->_getPage()) {
$keys = array('onecolumn', '1column');
$template = $this->_getPage()->getCustomField('_wp_page_template');
foreach($keys as $key) {
if (strpos($template, $key) !== false) {
if ($rootBlock = $this->getLayout()->getBlock('root')) {
$rootBlock->setTemplate('page/1column.phtml');
}
break;
}
}
}
I'd start looking there.

Resources