php - Magento Layot XML - Change template for 2columns-left.phtml -
I am working on a Magento project which is based on the Ultimo theme and is using the Wordpress WordPress extension.
I'm just trying to change the 2column-left.phtml template on WordPress pages, but it can not work! Next scenario: Altimo theme is the main content before the left content of the set and the This HTML is being generated with last / default / template / page / 2column-left.phtml as follows: I would like to use my own template file, to move only the sidebar in HTML pages before the main content for the WordPress pages, this way the WordPress categories above the main content a mobile. I tried to make my own template called page / wp-2column-left.phtml and set it down to code and site with the site's Wordpress section Some other changes in my topics are given in local.xml: But still the original 2 column-left.efile template is being called. I can edit the template file directly and get the desired result on the WordPress section of the site, but this Magra will affect the rest of the site and this is not a good practice. You can get it by using the XML layout code. The following code will change the template for all the pages created in WordPress: The following code will replace the template for the WordPress page with an ID of 32: After adding this code to the XML layout file, you will need to refresh your layout XML cache (if enabled). float: right; After using the CSS rule on the main content, the left column HTML is structured like this:
& lt; Div class = "col-main grid4-3 grid-col2-in-col2-in-col2" & gt; [Omitted code] & lt; / Div & gt; & Lt; Div class = "kernel-left sidebar grid 4-1 grid-to-sidebar sidebar" & gt; & Lt; Div class = "wp-sidebar" & gt; [Omitted code] & lt; / Div & gt; & Lt; / Div & gt;
& lt; Div square = "Cola-main grid 4-3 grid-colo-2-in-cola 2" & gt; & Lt ;? Php echo $ this- & gt; GetChildHtml ('global_moder')? & Gt; & Lt ;? Php echo $ this- & gt; GetChildHtml ('content')? & Gt; & Lt; / Div & gt; & Lt; Div class = "kernel-left sidebar grid 4-1 grid-to 2-sidebar in-sidebar" & gt; & Lt ;? Php echo $ this- & gt; HTML code ('left')? & Gt; & Lt; / Div & gt;
& lt; Wordpress_page_view & gt; & Lt; Reference Name = "Basic" & gt; & Lt; Action Method = "Settaplate" & gt; & Lt; Templates & gt; Page / 2columns-left.phtml & lt; / Template & gt; & Lt; / Action & gt; & Lt; / References & gt; & Lt; / Wordpress_page_view & gt;
Comments
Post a Comment