Ventrasoft
-
10/18/2012 8:36:06 PM
Visibililty of Specific Web Parts and Fields in a document based on field in document.
Basically I have a Document Type that is for Businesses in a Business Directory. I have a multitude of fields as part of this document type.
On the page (Document) itself I use a alternative form for displaying the information about the business. I also use a rating control, a media library, comments section and a tab page control which contains lists of other hyperlinked documents.
I have three business levels, Basic, Enhanced and Full. Depending on what type of business partner they are, each business will be assigned to one of the three levels when they are created. This is done via a drop down list and I am storing it in the business document type.
Each level has fields as well as web parts that should and should not be displayed to the regular site user, which is dependent on what level the business is assigned. For example a basic business will not have their email shown, nor their website url as well as hiding the media gallery and the tab page control. An Enhanced business will have these shown.
So in essence the page (document) is dynamically configured when it is loaded based on what business level they are for display purposes.
I can code this in C# in my own project very easily buy just grabbing the data from the field on Page Load and setting labels, text boxes and objects visible property to true or false.
Rather than creating a custom control and custom web parts to do this, is there an easier way to accomplish this within Kentico. I would like to leverage the use of the alternative forms so that my client can change the layout in the future as well as leverage the cms and change the layout.
Any suggestions would really be welcome.... I am stumped.
|