I have several stores with different layouts. When I make a search in a store, the result is displayed with the default layout. If I call getStore by AdvancedController, the result is correct but the page has incorrect layout.
In the default layout:
<catalogsearch_advanced_result translate="label">
<label>Advanced Search Result</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="catalogsearch_advanced_result">
<action method="setColumnCount"><columns>4</columns></action>
</reference>
</catalogsearch_advanced_result>
while in another store layout:
<catalogsearch_advanced_result translate="label">
<label>Advanced Search Result</label>
<!-- Mage_Catalogsearch -->
<reference name="root">
<action method="setTemplate"><template>page/3columns.phtml</template></action>
</reference>
<reference name="catalogsearch_advanced_result">
<action method="setColumnCount"><columns>3</columns></action>
</reference>
</catalogsearch_advanced_result>
The result from each store is always displayed with the default layout.
How I can resolve it?
The Advanced Search Results layout is controlled through your theme's catalogsearch.xml layout file.
You can either modify that or override it using a local.xml layout file and change the template used for the advanced search results;
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<!-- Advanced search result -->
<catalogsearch_advanced_result>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</catalogsearch_advanced_result>
</layout>
If you are changing the catalogsearch.xml and scratching your head as to why the layout isn't changing in your site then first of all verify that the theme author/other developers haven't already overridden this in local.xml
Related
I am creating an add-in for Microsoft Word.
I am getting manifest validation error for Title element inside Action element.
Microsoft Reference documentation for Action Element
Error #1:
XML Schema Violation: Your manifest does not adhere to the current set of XML schema definitions for Office Add-in manifests. (link: https://aka.ms/add-in-manifest-schema-violation)
- Details: The element 'Action' in namespace 'http://schemas.microsoft.com/office/taskpaneappversionoverrides' has invalid child element 'Title' in namespace 'http://schemas.microsoft.com/office/taskpaneappversionoverrides'. List of possible elements expected: 'TaskpaneId, SourceLocation' in namespace 'http://schemas.microsoft.com/office/taskpaneappversionoverrides'.
- Line: 54
- Column: 22
Example:
<Action xsi:type="ShowTaskpane">
<Title resid="Contoso.Taskpane.Title" /> --> //Adding this line throws error
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Contoso.Taskpane.Url" />
</Action>
Could someone help me here?
The validator checks the order in which the XML elements appear.
Please use the code below:
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Contoso.Taskpane.Url" />
<Title resid="Contoso.Taskpane.Title" /> -->
</Action>
I have created an eclipse plugin project. I want this plugin to be available as a popup. Therefore I have created an extension point with "org.eclipse.ui.popupMenus" (I know it is deprecated now, ours is an old project.)
I want this popup option to appear only at the file level with certain extension (say xml). Currently, it is appearing anywhere on right click.
I have looked around the internet and got to know that I can add a "visibility" tag that can set rules where this popup should be visible. However, I do not know the syntax for that.
Can someone please help me out? How to set the visibility of the popup menu so that it is visible only when I right click ON the filename with extension xml?
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="true"
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.*"
id="org.eclipse.lyo.tools.codegenerator.ui.popupMenus.contribution.IFile">
<menu id="org.eclipse.acceleo.module.menu" label="Acceleo Model Code Generator" path="additionsAcceleo">
<groupMarker name="acceleo"/>
</menu>
<action
class="org.eclipse.lyo.tools.codegenerator.ui.popupMenus.AcceleoGenerateCodegeneratorAction"
enablesFor="+"
id="org.eclipse.lyo.tools.codegenerator.ui.popupMenus.AcceleoGenerateCodegeneratorAction"
icon="icons/default.gif"
label="Generate Java Code from Model"
menubarPath="org.eclipse.acceleo.module.menu/acceleo"/>
<visibility>
//what should come here?
</visibility>
</objectContribution>
</extension>
</plugin>
(http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_popupMenus.html)
Regards,
Yash
visibility can only be a child of objectContribution not action.
In any case you can use the namefilter attribute to restrict the file name matching. You would only use visiblity to do more complex checks.
For example this is one of the JDT items:
<objectContribution
adaptable="true"
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.xml"
id="org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard">
<visibility>
<objectState name="contentTypeId" value="org.eclipse.ant.core.antBuildFile"/>
</visibility>
In this
adaptable="true"
objectClass="org.eclipse.core.resources.IFile"
restricts the actions to a workspace file
nameFilter="*.xml"
restricts the actions to files ending in .xml
<visibility>
<objectState name="contentTypeId" value="org.eclipse.ant.core.antBuildFile"/>
</visibility>
further restricts the actions to files with a 'content type' of 'Ant build file'
To match multiple name patterns remove the nameFilter and use a visibility like:
<visibility>
<or>
<objectState name="name" value="*.xml"/>
<objectState name="name" value="*.java"/>
</or>
</visibility>
First time on site. Forgive me, I'm probably doing this wrong, but I have searched for 2 days and not found my answer.
After entering data in the Lead Maintenance form, clicking the Registrar tab runs the following macro:
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
<UserInterfaceMacro For="navbtnRegistrar" Event="OnClick">
<Statements>
<Action Name="SetWarnings"/>
<Action Collapsed="true" Name="OpenQuery">
<Argument Name="QueryName">qryEnroll</Argument>
</Action>
<Action Name="OpenQuery">
<Argument Name="QueryName">qryLeadMainUpdateEnrollToTrue</Argument>
</Action>
<Action Name="SetWarnings">
<Argument Name="WarningsOn">Yes</Argument>
</Action>
<Action Name="OpenForm">
<Argument Name="FormName">frmStudentsData</Argument>
</Action>
<Action Name="CloseWindow">
<Argument Name="ObjectType">Form</Argument>
<Argument Name="ObjectName">frmStudentsData</Argument>
<Argument Name="Save">No</Argument>
</Action>
</Statements>
</UserInterfaceMacro>
</UserInterfaceMacros>
The new data is being appended to the table properly, however the New Student data form is not displaying the appended data. Any suggestions?
It looks like your Student Data Entry form is in "Data Entry" mode, so it will automatically only show a blank record for your users to fill out. You would need to turn off Data Entry mode, a property on the form itself and turn on the navigation bar that you already have on the Lead Maintenance form so that users can navigate between records.
My code :
<reference name="before_body_end">
<block type="test/test" template="test/test.phtml" name="test-test" />
</reference>
when i change to
<reference name="after_body_end">
<block type="test/test" template="test/test.phtml" name="test-test" />
</reference>
then it is not working. please help
It doesn't work because you are referencing ...well...nothing. The block with name after_body_end does not exist.
I will explain how to add it but first I want to make it clear that I don't approve of adding html outside the body tag. This may cause issues on some browsers.
First you need to create the block with name after_body_end.
For this edit the file app/design/frontend/{interface}/{theme}/layout/page.xml and look for this :
<block type="core/text_list" name="before_body_end" as="before_body_end" translate="label">
<label>Page Bottom</label>
</block>
Right under that add the following.
<block type="core/text_list" name="after_body_end" as="after_body_end" translate="label">
<label>Page Unde the body tag</label>
</block>
Now your block exists. You just have to add it to your page. For this edit the following files all located in app/design/frontend/{interface}/{theme}/template/page/:
1column.phtml
2columns-left.phtml
2columns-right.phtml
3columns.phtml
empty.phtml
popup.phtml
print.phtml
For all these files add under the </body> line this:
<?php echo $this->getChildHtml('after_body_end') ?>
Clear the cache and enjoy.
I created a new custom block and added it to the before_body_end block.
When I look in my pages' source code, nothing appears from my custom block.
Could you help me debug this please ?
In my module layout XML file :
<layout version="0.1.0">
<default>
<reference name="before_body_end">
<block type="tankchat/js_view" name="tankchat.js.view" as="tankchat" template="tankchat/js/view.phtml" />
</reference>
</default>
</layout>
Nothing special in my Company_Tankchat_Block_Js_View class, only some "getData" functions.
And my phtml is located at app/design/frontend/company/default/template/tankchat/js/view.phtml and yes it's the good package and theme etc.
Do I need to add somewhere a echo $this->getChildHtml('tankchat') ? I think I don't because my custom block is passed to before_body_end, but maybe I'm wrong ?
Any help will be highly appreciated !
Ok I finally found out what was wrong :
I made a mistake declaring my layout file, it need to be done in frontend node, not in global ! :
<config>
<frontend>
<layout>
<updates>
<tankchat>
<file>tankchat.xml</file>
</tankchat>
</updates>
</layout>
</frontend>
</config>
The file wasn't even opened by the app...
But I also forgot to declare the blocks prefix in my module config file :
<config>
<global>
<blocks>
<tankchat>
<class>Company_Tankchat_Block</class>
</tankchat>
</blocks>
</global>
</config>
The block class wasn't found by autoloader...
Hope this will help someone in the future...