I am new to Umbraco, and am trying to get to grips with its concepts, in particular how to create lists. For example, you might want a news listing that appears on a page as a list of headlines with mouseover extra content, but you don't want to be able to click on an item and open a full page, it's just there as a list.
You could create a repeating grid of content on the page itself, but that could become unwieldy.
It looks like (correct me if I am wrong) the Umbraco way is to create a parent page, and each news item to be a child page, which can be edited individually, and use a partial view to list them on the required page.
Is this the recommended approach?
If so, two questions :
How do I exclude these news 'phantom' pages from the main navigation - I understand I could set a true/false property on the page with alias umbracoNaviHide and tick this (which excludes it from 'visible' in the queries)
If so, how do I prevent direct access to the news page by its url (the umbracoNaviHide does not prevent the page opening)
Presumably these news pages would show in the back end main view as they would be descendants of the home page?
Any advice welcome!
You can use a Content Repository to hold content objects that won't be pages in your application.
Use following steps:
Step 1: Create the root content repository document type
Go to your backend to the Settings section. Under Document Types create a new type and give it the name Content Elements. After creating this make sure to check the checkbox of Allow at root in order to add this element to your root in the Content section.
Step 2: Add your newly created document type to the root of the content
Go to the Content section and choose to add a new item directly under content ( select the three dots next to Content ).
Select your Content Elements item, give it a name and click save.
Step 3: Remove the checkbox allow at root
You only want to add one Content Reposity item to your root where you will place all items like news, jobs, locations,...
Go to the settings of the Content Elements document type and remove the checkbox of Allow at root.
Step 4: Create a child repository for each type
Using your example I will now create a News document type which will be a child item of the Content Elements repository.
Go to the Document Types under Setting in your backend and choose to add a new document type. Give it a name News and choose save.
In the settings of the Content Elements check the checkbox of the newly created News item to allow as a child.
Step 5: Add the news list in your content
In the content section choose to add a new item under the Content Elements using the three dots.
Select the News item, give it a name and choose save.
Step 6: Create a new document for the news item
One more item is a NewsItem which will hold the properties/information of the item.
Using the same steps of 4 you can easly add this. Be aware that now you have to go to the News item where you will add a check to the NewsItem checkbox to allow as a child.
Also now define some properties of the newsitem.
Step 7: Add newsitems in the content
Using the same steps from 5 you can now add items in the news list.
Step 8: How to place a content element on to your page
If you have created a page you can add a property with a ContentPicker datatype which can be used to select a item from the Content Elements repository. Or using partial views you can create a list from the News to get all items.
Hope this helps!
Related
The problem is the folowing:
I have one list that shows up on 6 diferent forms using content types.
I have to show a name for each different form but have no idea how to do it.
I tryed googling but no luck there.
If I had 6 diferent forms I would solve it but i must use this because of the related workflows.
You have 6 content types in one list ? And you want to show some name depending on content type ?
If this is your case then you can add Content Editor Web Part or Script Editor Web Part to default forms (New, Edit, Display). This web part will contain javascript code.
Javascript code on form load will get content type id query string parameter from URL and render necessary name depending on this content type id.
Go to your library, and from the ribbon choose Library Settings
From the Settings page General Settings column choose the Advanced Settings Link
From the Advanced Settings page choose the Yes radio button for the Allow Management of Content Types option, and then click OK
From the Settings page, in the Content Type panel, choose Add from Existing Content Types
From the Add Content Types add the Content Types you want to use on your page and click OK
From the Settings page, in the Content Type panel, choose Change new button order and default content type
From the Change New Button Order page ensure all your content types have the Visible box checked (this makes the Content Types useable in the list) and then click OK
Now go back to your normal list view and from the ribbon choose New Document - you should see all your Content Type forms listed
I have a list view, showing news of a specific category A.
I want to further limit the list by one additional category the user can select.
I add a category menu to the page. The list view page is the same as the initial list view page.
After the user chooses a category B from the category menu, the page displays the news items with category B.
Instead of this, I want the news items that are of the initial category A and the user selected category B.
How would I do that?
You need to build a link holding both category IDs. Currently it is not implemented that you can provide an additional category.
I am working in a small SharePoint project to let school students pre-order the lunch online.
the main idea is the student can login to a school site, fill an order form.
I try use a list form to do it, just simply put a InfoPath form as web part on the home page.
When students open the site, he can fill the order form directly.
but the problem is the default view of this web part is always the new item form. so when a student already make the order, then login to site again,
how can I let him see his order and edit it instead a new order form.
another way may be use the form library, but i don't know how can i transfer the filed from the form to a list. because at last we still need a list instead a bunch of documents to get the summary of order.
Thank you for help.
Perhaps you can use a custom list and show that on the homepage?
A 'custom list' by default only has a title column but by adding more columns through the list settings you automatically add form fields on its new item form.
Since you are creating an order form you might want to hide the title column. Go to the settings of the list, then advanced settings, allow editing of content types. Then back in the list settings click the 'item' content type, then the title column then click the radio button for hidden.
The solution is probably not unique to Concrete5 CMS, but I need to build a page with a list of items. Each item would link to a detail page of that item showing a full text description.
Each item on the initial summary page would have the first few lines of the detail page description and a "more" link.
Does anyone know how I could go about doing this in C5?
This is a very common thing to do with Concrete5, and there is a built-in block to handle it -- it's called "Page List".
Note that out-of-the-box, this block doesn't show the first few lines of each page's content, but rather shows the "description" field as entered when creating the page (or editing the page's properties). But I have a free addon available in the marketplace called "Page List Teasers" -- http://www.concrete5.org/marketplace/addons/page-list-teasers -- which adds this functionality to the built-in Page List block.
You can also check out the blog views of the page list - they show how to display an area from another page with all the content blocks they contain, and how to display attributes. You could make a rich text attribute called description then display that as you loop through the list of pages.
I have a dojo layout that creates a sidebar on the left with a list of pages and a center area which is a tab container.
When a user double clicks a page in the sidebar, it creates a new closable tab in the center with a form to edit that page (the form is loaded via the href attribute on the ContentPanes, it's a standard Zend Framework request). However, if I open two or more pages, it creates all the elements and form controls with the same dijit IDs which creates conflicts. (This is expected I guess)
Aside from manually appending the current page ID to every element/dijit on the tab contents, does anyone know of a cleaner way for me to do this? Will this be an issue with the form element name attributes still being the same?
I guess the other approach is to not put id's on any of your widgets.