Add list of item in editor view page of orchard cms driver class - orchardcms

I try to create custom content part with following specification.
I need to add list of items in database with same editor template view page of driver.
I want to include one form with required fields with an add button, by using this add button I want to add more number of rows with given field values in database.
I have checked Orchard documentation in this link, they provide sample with single item add in editor template page. In my case I need to add multiple items in editor page.
In display view page of driver, I want to retrieve collection of data from database and rendered in display view page.
Please share some details for this.
Thanks,

Related

Attachment download from view

Is there a way to list all documents in a view control (or a repeat control) and have a download button / link that will allow the user to download multiple attachments that reside in a rich text field?
I have found options using the #AttachmentName, however this lists all attachments on the document and does not restrict the attachments to just one the RTF.
I have a work around using a dialog box, which does work well, just not as clean as the option I was looking for.
In a view you can have a computed column. Any code you place into a dialog could be placed into a computed column. The getDocument() method of the XSPviewEntry gives you access to the document (recycle wisely).
update
To use a download control, use a repeat with the view as datasource and a panel per row. The panel has the data source pointing to a document. Use tr as tag for the panel.
This is only needed if you have attachments in other fields you don't want to show

view content items on screen from front end with orchard

Using orchard 1.6. I've created a content type 'ImageUpload' which has 2 fields 'Image' and 'Date'. So the user can select todays date and upload an image. The uploads can be viewed from the 'Content Items' section of the dashboard but...
I would separately like to access/view the uploads from a different section(as the user wont have access to view the content items page) Iv set up a navigation menu but how can I view the records?
The content items are stored in the 'ContentItemVersionRecord' table...?
I don't fully understand your question. View the content items on the front end? Try using the projections module. You create a query that gets content of ImageUpload type and then you create a projection page that will use this query. Enable Projections feature, it comes with 1.6

displaying a list on screen with orchard

Using orchard cms 1.6 I have a table in my db 'cars'. I want to display the column 'CarName' from the table, as a list on screen with all the records from the table.
carname1
carname2
carname3
When the user clicks on their link it will bring them to that page.
I know how to do this from the view e.g.
#T("Cars")
but I would like to try and create a content type which shows this list.
Content type seems to be all UI related. Im not sure how to take a table and display a column as a list on screen through the content type...any idea on how to do this?
then I can choose to show the content type as a form and the user can view it from the main menu.
thanks
It looks like you want to create a content type called Car, possibly with a CarPart and a record class CarPartRecord (perhaps refactor your Car class to CarPartRecord to follow Orchard's naming conventions). Make sure CarPartRecord derives from ContentPartRecord.
To render a list of Cars, you could use a Projection that renders a list of cars. A Projection renders content based on a Query, which you configure using the dashboard.
Alternatively, you could create a controller that leverages IContentManager to query all Car content items, and returns a view to render them in a table.
For each Car content item, use Html.ItemDisplayLink to render a link to its details page.

How to show list of custom objects in a page in Drupal

I want to create a page in Drupal 6 where I can show list of restaurants.When a user clicks on any restaurant page, I should be redirected to Restaurant details page.
For this :
1.) I created a new content type called "Restaurant" with some fields.
2.) Created 3-4 content items for Restaurant( Restaurant1, Restaurant2, Restaurant3)
3.) Created view called: RestaurantList, Added Fields for it. Then added Page Display and gave the path for it http://website/Restaurants
Now, when I browse to Restaurants page, I only get labels of my fields but no values. How can I get the values but not the labels? Also, I want to go to the RestaurantDetails page. How can that be achieved?
Thanks,
Rashmi
Well if I were to set up a page view this is how I would set it up:
Filters:
Node type - Restaurants
Node published - Yes
Fields
Node title
check the option Link this field to it's node
leave the Label: field empty
check option Hide if empty
And if your view style is a HTML list, for extra you can go to Row style options and check the option: Hide empty fields
Make sure you click Preview to see if you get any values. If you don't then there's something wrong with the view settings, most probably the filters which are to restrictive. Start with something loose, like Node type - Restaurants.

How can I present a library as a custom view?

I have a Sharepoint library that is currently rendering as the usual folder and document items table list view.
I would like to use present the same information as a grid of folder and document icons with some nice jQuery hover animations to show tooltips on the item the icon represents.
I suppose what I am really trying to find out is how to add a new library view that allows me to specify the markup rendered per item. I could write a new webpart to query the list and use an ASP:Repeater but I don't want to have to specify a webpart property each page to tell the webpart where it should open the list from.
You can use List View Web Part with custom XSLT.

Resources