Error loading Partial View script (file: ~/Views/MacroPartials/Gallery.cshtml) in Umbraco project - asp.net-mvc-4

Currently working on a project in Umbraco. Where I created a gallery using partial macro views. I tried to beautify the gallery by using lightbox plugin. I copied css file in css folder, images in images folder, js file in scripts folder from lightbox plugin. But while clicking gallery page it throw following error:
Error loading Partial View script (file: ~/Views/MacroPartials/Gallery.cshtml)

Probably just an error/bug in the Gallery.cshtml
You found the reason in the log file
goto: \App_Data\Logs\UmbracoTraceLog.txt

It looks like that view is missing a #using block
#using Umbraco.Web.PublishedContentModels
There should be a generated Image class in your App_Data\Models folder

Related

Docusaurus server-side rendering could not render static page with path

I have a problem with displaying multiple API using Redocusaurus plugin
My nav dropdown looks like in the image
My Redocusaurus settings looks like in the image above
I keep my yml files in the folder apiConfigFiles
And locally everything working fine, but the problem appears when I make npm run build I have errors like in the image above...
Do you have any ideas how I can repair this??

Reference HTML file in iframe with Quasar framework

I need to open an static HTML file inside an iframe because I need it to be printed silently, I’m trying setting the iframe src with absolete and relative paths but none of them work, I’ve tried moving my files inside public, static and assets folders with no success, I’ve seen that some people uses process.env.BASE_URL to access absole path of environment but it doesn’t work in Quasar.
Currently I have my files in a folder called ticketTemplates inside public folder placed at root, and it has two files: first.html and first.css, I’m doing the following:
<iframe src="ticketTemplates/first.html" frameborder="1"></iframe>
But as I said before it does not with relative or absolute paths. I've tried with http://localhost:8080/ticketTemplates/first.html too and it does not work.
Could you tell me how to achieve it?
I opened this tread in Quasar Forum and I found I was using an outdated version of #quasar/app, I updated my project and the content worked inside my iframe.
I moved my ticketTemplates folder inside public folder located in root directory, next to quasar.conf.js file and the resulting code was:
<iframe src="http://localhost:8080/ticketTemplates/first.html" frameborder="1"></iframe>
All the credit goes to the user who helped me.

couldn't parse bundle asset chunk-vendors.js

I created a project using vue ui. When I clicked the serve button, it's ended with an error. I can't open the app I have created. The error is:
Couldn't parse bundle asset "{path}\dist\js\chunk-vendors.js".
Analyzer will use module sizes from stats file.
Edit .vuerc and change/update "packageManager": "npm"

External JS not loading when router.push is executed in vue js 2

I have a project where I have placed the external js files like jquery, datepicker etc in the 'static' folder. I am importing them in the index.html file.
It is getting picked correctly when the page is directly loaded. But when navigating to the page using $this.router.push('/dashboard') the javascript does not get picked up.
Not sure if I am missing something here

How to use Free CSS Templates with ASP.NET MVC 4?

I need to use a css template for webpage I am building but I don't know how to use in asp.net mvc4. so How to use CSS Templates with ASP.NET MVC 4 in visual studio 2012 for web application?
It's simple:
Move your css and images into ~/Contents folder.
Move your js files into ~/Scripts folder
Copy and paste your html snippets to cshtml files
On 3rd step you need to port the layout portion of your template to ~/Veiws/Shared/_Layout.cshtml. Here you need to point references to your css and js correctly. For example:
And also you need to be aware that _Layout.cshtml should contain #RenderBody(). That's where all child views will be inserted.
Just found a video with basic demonstration of process: link
It is the same as you use for simpe HTML files. In the solution you can add an existing item and your browse your CSS file which will be added in the Content folder then you have to reference it in the page where it will be used.
If you want to apply all the rules to every page you can reference it in the _Layout.cshtml page which is called before everypage. It is like the container.
You have many options to call it. I will suggest you also reading Bundling and minification in this link which is also interesting to know.
There are Few Steps:
Make Directory inside Content folder in my case mytemplate.
Copy all your template content inside mytemplate folder.
Add new Layout page in View>Shared Folder in my case _mytemplate.cshtml.
open your template Index.html file inside any editor(i.e: Dreamviewer,Notepad etc).
Copy all header stuff from your html file to inside of Header in _mytemplate.cshtml file.
Copy all body stuff Inside of your Index.cshtml to Layout page.
Save your Project by Cntrl+S and Run it in browser. Thats it.