aspnet core 1.0.1 taghelper not worked in area - asp.net-core-1.0

I am facing a problem in aspnet core 1.0.1. I added the tag helper name space in Views/_ViewImports.cshtml but it not worked in area views cshtml files. If I added manually or added in Area/View/_ViewImports.cshtml then it worked.

Have you added _ViewImports.cshtml at proper level? That is normal structure:
Now for the area it should looks like:
And _ViewImports.cshtml file should be placed in the at the same level - so in each Views directory for each area.

Related

__layout.reset has been removed in favour of named layouts

I have a page set up in this format
original reset image›
I looked at forums and it said i should change the inner layout page to __layout#reset.svelte. However when i do that, I get another error.
reset image using #reset instead of .reset
Does anyone know how i can put in a reset __layout inside of a folder and get it to override the parent layout?
Your error is because __layout#reset.svelte would be looking for a __layout-reset.svelte file in it's current directory, or any parent directory directory, to be a sub-layout for. You don't have a __layout-reset.svelte file.
As Thomas Hennes mentioned in the other thread. If you wanted to have it act like the reset, you'd need to create a __layout-reset.svelte file in the current folder or (more useful for the entire app, in the root folder) and have it be a blank <slot />. From there, you can do __layout#reset.svelte to which will allow you to make a completely new layout.
I think that you can solve this problem by fallowing this steps :
Create "__layout-choseNameYouWant.svelte" at the same level as "__layout.svelte"
Create "guides#theSameNameYouGaveForLayoutFile.svelte" at the same level as
about.svelte
Layouts can themselves choose to inherit from named layouts
create "__layout-root.svelte" at the same level as index.svelte and about.svelte with the following code
<slot/>
create "__layout#root.svelte" in guides folder with the following
<slot></slot>

Issue in creating Layout in Liferay DXP

I am trying to create a layout in Liferay DXP using themegenerator by following this link : https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/creating-layout-templates-with-the-themes-generator-0.
On successful completion of the steps mentioned in the link, -layouttpl gets generated but .tpl file and .png file are not getting generated. What can be the issue?
I created layout with theme generators, but i found inside 'yourlayoutname/docroot'.
Please make sure you followed all steps, mentioned in - in document you shared link. Once you created layout, you have to define rows and columns of layout. Pls make sure you followed all instructions.

Exception when trying to use icons from Asset Catalog in iOS project with Xamarin TabbedPage

I create a Xamarin Forms project in VS 2017 and started by adding a TabbedPage with three tabs. I then added the icons to the Android (in Resources/drawable) and iOS (Asset Catalogs/Icons) projects.
When I start the project on Android it works fine, but on iOS I get an exception that the UIImage cannot be loaded because initWithCOntentsOfFile returned nil. Which is actually correct, because that's not the correct method to use to access Assets. But it's the TabbedPage calling the method, so I cannot do anything about it.
The TabbetPage looks pretty basic.
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:GreenThumb"
x:Class="GreenThumb.MainPage">
<NavigationPage Title="Today" Icon="current.png">
<x:Arguments>
<local:Current />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Overview" Icon="overview.png">
<x:Arguments>
<local:Overview />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Settings" Icon="settings.png">
<x:Arguments>
<local:Settings />
</x:Arguments>
</NavigationPage>
</TabbedPage>
And the Asset Catalog looks like this:
This problem seems to be pretty old, but I haven't found any solutions aside some very dirty hacks.
Is there a clean solution out there? Or do I just have to add all my images in the Resources folder instead of Asset Catalogs?
I struggled in the past on this issue. It seems that icons for tabbed pages are not working in iOS if placed in the .xcassets.
I moved those .png files inside the Resources folder and that made the magic.
I suppose it's a kind of bug on Xamarin.
The same error was occurring to me, and I was putting the images on the .xcassets on iOS.
When I placed the images on the Resources folder, they appeared normally on my TabbedPage.
In the official Xamarin documentation about images, they say to put the images in the Resources folder.
iOS - Place images in the Resources folder with Build Action:
BundleResource. Retina versions of the image should also be supplied -
two and three times the resolution with a #2x or #3x suffixes on the
filename before the file extension (eg. myimage#2x.png).
I place all my images in the .xcassets folder, they apparently work well, but it seems not to work on every case.

Sitecore.Placeholder("content") searching in wrong location for partial view

I have an MVC 5 application set up and it deploys to a Sitecore 8.0 Website. I have the Sitecore home item set up to render two "controls" - a PartialView Rendering called PageHeader and a Controller called HelloWorldController.
I am invoking these on a Layout which is assigned to the home item - the code that registers to that layout is as follows:
<p>Today's date is :#DateTime.Today.ToShortDateString()</p>
#Html.Sitecore().Placeholder("content")
For some reason, when I visit the homepage, I get this error:
The partial view '/views/renderers/Views/PageHeader.cshtml' was not found or no view engine supports the searched locations. The following locations were searched:
/views/renderers/Views/PageHeader.cshtml
However, my PageHeader doesn't live inside "/views/renderers/" . that directory doesn't exist. Does Sitecore generate this "/views/renderers/" from somewhere?
These is due to Mvc.RenderersViewFolder setting in App_Config\Include\Sitecore.Mvc.config, you need to patch the value:
<!-- MVC: Path to the base file folder that contains the views used for item renderings.
Default: "/views/renderers"
-->
<setting name="Mvc.RenderersViewFolder" value="/views/renderers" />
Patch the value to either empty string or whatever your views folder is.

Path to layout xml files in magento

I have seen that we can place our layout xml files in
app/design/frontend/default/default/layout
or we can place our customization inside
app/design/frontend/base/default/layout/local.xml
file, but I have read at magebase and at magentocommerce that we can place our layout files under
app/design/frontend/your_interface/your_theme/layout/
or
app/design/frontend/[package]/[theme]/layout
So if we I have package like 'Kaushikamdotcom' in 'app/code/local', should I have to create that same package under 'app/design/frontend/' ? I tried many patterns, but nothing worked out for me.
I am quite sorry that I have made such a blunder asking this question, but I am answering this as lots of people will be making the same mistake. Package means; in the admin side of magento open
System->Configuration->Design
Then change the configuration scope to Main website. Then select Package section, uncheck the default check box and use your package name such as "Test". Then create the following folder structure.
app/design/frontend/Test/default/layout
Place your layout xml files here. If you are using your own themes use that name instead of default.
It depends what layout-xml file you have.
If you want to build up your theme, use the local.xml file in your theme dir.
If you write an extension and want to add a block to use inside this new extension, add a layout-xml file via config.xml and add it under base/default/layout/yourname.xml
When you do it this way, your theme-related changes only appear in the theme and your extension-related changes are theme-independent

Resources