Repeat the page with different contant

Topics: Customizing Orchard, General
Jul 6, 2011 at 2:18 AM

Hi All,

I have a page design, which suppose to be repeated 1000 times with different content.

How can i make it , Is it possible to update the database straight.


Thanks in advance

Jul 6, 2011 at 5:36 AM

The page design is the layout.cshtml, that you put into your theme. now the content, it depends, what kind of content? If it's just plain pages, just create plain Pages. You need to learn about themes, and about content types. The documentation could be a good place to start.

Jul 6, 2011 at 8:15 AM

Thank you for your reply,

Since i am new, i dont know exactly where to start, and i will do as you suggest.

Anyway i say what i am trying to do.

lets consider a page Main.html

Main.html has 1000 links => sub.html

sub.html   has an Image and a content.

to say not 1000 even 50000, so is there any way to create 50,000 content.  ( i have content in my SQL database)

Lets say after  a month i would like to change all the 50,000 content.

can i do something with database straight. or only i can do with UI.


Dear Friend, Since i am new i may ask you irrelevant questions. sorry if any.

Any way i practice themes and content type as you mentioned. But even if you thing you can suggest me something i am happy.

Jul 6, 2011 at 8:49 AM

My opinion is that you should try to create this

ContentType Link ( persisted with a LinkRecord )




You create a List called Links, that contains Link ContentTypes. And you make a link on the main page where you can display that list.

Add two or three links, and export them to get an xml file that you can then manually populate, 1000 links would be hard to add manually. I assume you made the migrations, and declared the new content type etc. as explained in the docs.

You can also write your own Controller and View. The controller uses ContentManager to query the LinkItems, and pass them to the View to do a foreach and render them however you like. Then you set up the routing to the controller. Or you can design a Widget to display those links on any page that you like. The possibilities are numerous.

Just learn the basics. Create a ContentPart, create a Widget, Create a theme, Create a module with a Controller and a View. Once you've mastered the basics, more complex scenarios become possible.

Jul 6, 2011 at 8:58 AM

Thanks a lot