Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I would like your help please. I'm learning to work with TreeNodes and Views. I followed a tutorial at https://our.umbraco.com/documentation/Extending/Section-Trees/trees
The problem is my plugin is set up with links to views in a subfolder, but it does not load those views and the last part of the URL is chopped off. Why is this happening?
I've created a generic plugin. The plugin name is generalPlugin, the tree alias name is generalPluginAlias and the treegroup name is generalPluginGroup.
It has a TreeController set up with nodes to point at generic webpages. Some pages at root level of plugin and some in a subfolder.
This is my code which creates TreeNodes with route paths.
This is how it's rendered on screen. I can click on Tea-Edit and it will load the view from the route path "generalPlugin/generalPluginAlias/tea-edit"
However if I try to load a view from "generalPlugin/generalPluginAlias/cats/edit" or "generalPlugin/generalPluginAlias/cats/edit?id=0" by clicking on the link cats or cats with id, the last part of the URL is cut off and Umbraco website throws an error, saying page cannot be found at "/App_Plugins/GeneralPlugin/backoffice/generalPluginAlias/cats.html".
If you look at the screenshot below, you can see my link in the status pointing at "https://localhost:4432/umbraco/#/generalPluginAlias/cats/edit?id=0" but my Umbraco website is trying to load it from "/App_Plugins/GeneralPlugin/backoffice/generalPluginAlias/cats.html".
Why was my URL cropped?
I was unable to find a way to load views from sub-directories in my plugin folder.
Instead, I've put all files into one folder at top level and added a category name and action suffix to each filename e.g. dogs-view.html, dogs-edit.html. That works for me.
Out of interest, another developer had the same problem and posted his answers similiar as above.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted