How to configure NLog Layout to get a source file name and row number ?
Is this possible ?
The ${callsite} LayoutRenderer should do what you want.
http://nlog-project.org/wiki/Callsite_layout_renderer
Related
I have in my xml file, an empty HorizontalScrollView.
how do I add a picture to the HorizontalScrollView through the Java file.
plese refer this example
add scrollview inside dynamic view
https://www.dreamincode.net/forums/topic/130521-android-part-iii-dynamic-layouts/
I am a bit new to the Hybris platform. I am working with the Backoffice PCM on Hybris 6.7.
I would like to change the default browser display when using the PCM Backoffice. Currently the default behavior renders Grid View but I would like to use List View instead. I will like to either remove entirely the grid view option (or disable it) and automatically open products in list view instead.
You have to customize the xml to obtain the desired behavior. The best approach is creating a new extension from template ybackoffice to consolidate your changes.
Basically, the original extension have these lines:
<context type="Product" component="pcmbackoffice-assortment-collection-browser" >
<cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
<cb:available-molds default-mold="grid-view">
<cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
<cb:mold spring-bean="gridViewCollectionBrowserMoldStrategy"/>
</cb:available-molds>
</cb:collection-browser>
</context>
Just copy and paste in your new extension in the file <myextension>-backoffice-config.xml and remove the line correspondent to the grid view (for removing the option), eg.:
<context type="Product" component="pcmbackoffice-assortment-collection-browser" >
<cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
<cb:available-molds default-mold="list-view">
<cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
</cb:available-molds>
</cb:collection-browser>
</context>
Do ant clean all, and after HAC update in your extension.
Ps.: You can apply these changes through orchestrator to see the result in live, before create the new extension.
We have multiple plugins added to our application. Each plugin comes with its own logback_plugin.xml configuration file. We have to maintain the same in a specific folder.
I can use the INCLUDE tag for inclusion of another configuration file from logback.xml file. Can we do it for multiple files, something like
<include file="src/main/resources/*.xml" />
than explicitly naming a file, So that all the files are included. I tried the same but it ended up in an IOException.
You can achieve the same result by nesting the tags.
I added the below include tag to the main logback.xml file
<include file="src/main/resources/plugins_logback.xml" />
Added file plugins_logback.xml at the above location which had an <included> element . All other plugins specific logback configuration files were included as a sub element as mentioned below.
<included>
<include file="src/main/resources/plugin1_logback.xml"/>
<include file="scr/main/resources/plugin2_logback.xml"/>
</included>
Logback configurator loads the entire configuration from all the files during startup.
I know you can use layout filters for normal pages with urls, but upon errors the view changes while keeping the url the same, so I can't utilize a new layout based on the path. Any help would be appreciated. Thank you!
Off the top of my head:
If you look in Core > Shapes > Views, you will see two files - one called ErrorPage.cshtml and one called NotFound.cshtml. Simply copy these files and paste them into your theme's view folder.
I have not tested this method with these particular pages, but I did do something similar with the LogOn widget.
Something to bear in mind is that the contents of these files will be rendered in the Content zone of your current theme.
Noob Question here. I have created and successfully added an additional Page Layout to the existing theme on a client's website.
I then checked what was going on in the content area and found that a file, named grouped.phtml was being called.
The Problem:
I want to duplicate that file and call it (for example) grouped2.phtml and add it to my custom page layout, while keeping the first file (grouped.phtml) alone. How do I do this? Thank you ahead of time.
Copy grouped.phtml from base/default/template/catalog/product/view/type/ to grouped2.phtml in the same directory of your theme. Edit it as you wish.
Open up layout/catalog.xml in your theme. Find the lines that say
<block type="catalog/product_view_type_grouped" name="product.info.grouped" as="product_type_data" template="catalog/product/view/type/grouped.phtml">
<block type="core/text_list" name="product.info.grouped.extra" as="product_type_data_extra"/>
</block>
Duplicate those lines with your grouped2.phtml
done.
======EDIT===========
If you wish to retain the standard grouped.phtml as the default, but use your grouped2.phtml in some specific instances, you can make XML layout changes in the "Custom Layout Update" field on the Design tab of the specific products or categories in the Magento Admin. In that case, use the following XML:
<remove name="product.info.grouped"/>
<block type="catalog/product_view_type_grouped" name="product.info.alternative.grouped" as="product_type_data" template="catalog/product/view/type/grouped2.phtml">
<block type="core/text_list" name="product.info.grouped.extra" as="product_type_data_extra"/>
</block>
Note that the inserted XML has a different name.