Subject: CMS extra features
Posted By: outofwork Post Date: 8/7/2006 8:00:51 AM
Hi,

The CMS application is very useful for my team.
I consider myself a beginner in ASP.net 2.0 programming with about 24-30 hours of experience.

Being idealistic, I would like to know if I could further enhance the application by adding a search function and the ability include attachments when posting an article.

Do you know of any articles I can reference to or you have some insights of the above for me?? :)




Reply By: Imar Reply Date: 8/7/2006 2:32:59 PM
Hi there,

Glad you find the CMS application useful.

One of the things we kept in mind when writing the book was extensibility. So: you bet you can add additional features like a search engine ;-)

There are a few ways to add a search engine to your site. One is to use SQL Server's Full Text Search. Googling for this term brings up a number of useful tutorials.
 
Alternatively, you can execute a custom SQL statement against your database and then display the results. For a general overview of how this works, take a look here: http://Imar.Spaanjaars.Com/QuickDocId.aspx?quickdoc=241

I wrote that article as an extension to another book I wrote: Beginning Dreamweaver MX 2004 which deals with "classic" ASP. However, you'll find that the concepts (e.g. search term parsing, accessing the database, displaying results) is similar.

Chapter 8, the customer support site, uses the same strategy to search the site for downloads, FAQs and products.

Regarding attachments: take a look at chapter 8, 9 or 11. In these chapters, uploading of files is discussed. Once a file is uploaded, you can treat it like normal files; e.g. link to them, download them etc.

Hope this helps, and if not, please let me know.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply By: outofwork Reply Date: 8/7/2006 2:38:25 PM
Hi Imar,

Yes this is useful enough at this point of time.
Let me do some work based on the reference you pointed me to, before I ask further questions.

This is great!


Reply By: Imar Reply Date: 8/7/2006 2:53:56 PM
OK, good luck.

Don't hesitate to ask if you have other questions...

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply By: outofwork Reply Date: 8/24/2006 10:11:42 AM
Hi Imar,

The learning curve for ASP.net 2.0 has become a little too much to handle for me.
Haa.. :)

Pertaining to my fist posting in this topic, you have given me directions where I could try and do it myself to include file upload and search functions in the CMS application.

I am guessing in Chapter 11, the UploadHandler Class in Greeting Cards Application would be the one you are directing me to.

I was wondering how do I exactly implement this class into CMS application and also if I may go further, allow the CMS application to be able to attach multiple files in a single content.

My idea is to turn the CMS application into a File Repository.
One that has a short write up on a certain event with attachments documents like MS word, powerslides, etc..

Hope this is not too much to ask.

Reply By: Imar Reply Date: 8/26/2006 3:29:46 AM
Hi there,

You can certainly modify the CMS application to do that. What you could is this: (rough ideas)

1. Create a table called Attachments in the database. Give it fields to store a virtual path to an attachment, a content type (if you want), the ID of the Content object, an upload date time field etc etc.

2. In the admin pages for managing content, add multiple asp:FileUpload controls to the page. This allows your user to browse for one or more files.

3. In the Save handler for the content item, save the item so you get its ID.

4. Then for each uploaded file, stored the file on disk, and store the physical path to the file in the Attachments table, together with the ID of the content item. This way, you link attachments and content items so you can later display the relevant attachments with a content item on a page.

Hope this gives you some ideas about how to approach this.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.

Go to topic 11711

Return to index page 193
Return to index page 192
Return to index page 191
Return to index page 190
Return to index page 189
Return to index page 188
Return to index page 187
Return to index page 186
Return to index page 185
Return to index page 184