I cannot seem to figure out how to add my preexisting pages to the auto navigation menu that Piranha generates when I call #UI.Menu().
Currently, I am using the method described here under Getting the Models to pull CMS content and display it above my model data. I can successfully render the page with Piranha content, but I'm not sure how I can have this page display in the top navigation.
Alternatively, I can pull my data and display the CMS content by creating a new page type, but this means the page type is only ever used to display this single page. It shows up in the navigation generated by #UI.Menu(), but if I continue using this method, I would need to create an additional piranha controller for every Action.
My main objective is adding CMS functionality to my custom MVC project and have everything display in an automatically generated navigation with #UI.Menu().
If you want to add pages in the menu that aren't really controlled by the CMS add a single page type for them, for example "Application Page". Then check the documentation for page types under section 2.5 here http://piranhacms.org/docs/pages/page-types.
If you check the checkbox to allow pages to change the route you can specify the route on each page of this page type. This means you can add your application pages into the structure and the add the route to your controller/action.
Related
We’re using Kentico 11.0.26 with MVC.
I need to add an external link under a page.
In content tree it should look something like this:
Page A
Page A1
Page A2
https://www.www.google.com/
The problem is that when I click the + button in Pages application, I only see page types, and there is no option to add a link.
Why not use value of page field to store the link and load the value inside of MVC app? Content tree alone does not have capability for this. All nodes have to be pages in one way or the other and plain old link to external domain can not be placed instead of page. To be honest I do not see benefit of having a link inside of content tree even for menu since you have to create menu using document path and not only its name anyway so accessing additional property should not be that much of a problem.
You could create a new content type to represent an external link and put that into your content tree. This would then also give you options to set additional properties of the link such as target and title rather than just a URL.
I have very new requirement that I need to know we can achieve that with vaadin or not.
My team members already developed one functionality using jquery and jsp along with spring as backend. Suddenly, vaadin came into picture to develop UI.
Functionality:
Admin has the full access to all the modules. Admin user can add components from a pool of components to some other module. These settings can be saved into db. Later when I tried to access that module. Only those components(Admin selected components) should be available to me. In this case one jsp is automatically created with the admin selected components and that will be included into another jsp which is a user jsp.
My question is can vaadin fulfill this requirement?
Create one UI class (in GWT similar with EntryPoint) and create header , footer , leftside , rightside etc; And create Views as you want (for instance: userView , adminView). Add your default view in body content of UI class . Initialize Navigator for page navigation. When url was change or invoke by some request , navigator should manage relative body contents. Please check Usage of UI vs. Navigator+Views for further UI , Views and Navigation.
Here is example and sample codes. If you want to create as component , composition is a way.
This is repeatedly asked many times, however i couldn't find appropriate solution for my problem.
I want to create an Entry Form which will consists of following elements:
Text boxes, drop down fields (auto populated) , check boxes , radio buttons
After my research
i found that i need to create user control, or script file for above form and access it via Macro.
I don't want to use User control as my first preference is to controller-View-Model (i.e. cshtml)
I want to follow MVC approach to create above form. So
1) Do i need to create a seperate project for Add/Edit/Delete/Search Data Entry form?
2) OR i need to create cshtml file for the same(not so clear about this approach)
I'm looking this data entry form with easier for customization and i could use it in other applications as well.
From Umbraco 4.10 up to 6.0.x you can use MVC in Umbraco so there's no need to use an usercontrol. You probably want to use a SurfaceController where you can add any Action you want. The rest is standard MVC (Razor views to build your textboxes, drop downs, ...).
Check out the Umbraco MVC documentation where they explain how to use MVC in an Umbraco project.
I’m new to .net mvc and have become stuck when rendering data in my view.
I’m creating a small project management tool and I am currently working on the project admin section.
I’m sending a model that contains a list of all projects that a user has to a view that administers projects. The project list is rendered in a table. The model contains everything relating to the projects, phases, project users etc.
When I click on a row in the table, I would like to render the extended detail of that project below that table so it will display users and phases of the selected project.
With jquery I can do this, but I would like to code this event in the view using .net code and not use Jquery. My main objective is not to call back to the server as I have all the data available in the model.
I’ve searched around and can’t find that much detail about triggering events and rendering further detail on a page. I understand what partials do, but that would mean calling back to the server.
What is the best way to approach this type of problem? Should I just use JQuery? If I do use jquery, how do I then use html helpers in the script, if the script is not in the page?
You could have a form inside each row and a submit button to show the detail. When the submit button is clicked a controller action will be invoked and set the selected row project id which will use it to retrieve the project detail and passed back to the view. You will also need to retrieve the whole list of projects because in order to be able to redisplay the table as well. Your main view model will consist of a property representing the collection of all projects and another property containing the selected project details. Initially the details property will be null. When a project is selected you will assign it. Then inside the view you could test if the details property is assigned and render the details in a partial.
If you decide to use jQuery and AJAX then since you won't be redisplaying the entire page, you don't need to retrieve the project list for the view model in the details action. Only the details. And then simply refresh the corresponding section of the DOM with the partial returned by the action.
In a MOSS server, I would like a specific page layout to use the selected masterpage. Instead, i want this specific page layout to use a blank master page so i can use that page layout for pop message. I want to use a blank master page so that the my site's navigation menu, header and footer don't appear in my popup.
I found this blog post (Change MasterPageFile for a specific PageLayout) which explains how to do this but it requires the page to be ghosted which cannot be in my case.
Thanks
Create your own page layout in Sharepoint Designer, in the attributes of the page you can specify a masterpage url, instead of using the keywords ~default.master or ~custom.master use your own master page (make sure its published and available or it will fail).