The following is a description of the problem. Let's start with the data.
Data is stored in a custom list called pages. In addition to the default column, this list also adds an abstract column for storing multi-line text.ArticleSummary information. After data is entered in the list:
When we click a list item such as "page2", the dispform. ASPX page of the item is displayed .:
This page does not meet the customer's requirements on the overall style and layout of the page. The result of the page displayed by the end customer is as follows:
Therefore, we need to modify this page. In SharePoint desinger, we do the following:
1. Select the original listformwebpart and hide the visible = "false" of its webpartzone.
2. Add a line above and insert a custom list form (insert-> SharePoint control-> Custom list form ),:
3. After insertion, the page changes:
4. You can modify the dataformwebpart or the table to meet the display requirements.
We can flexibly customize the title and abstract parts .:
However, when the creator and creation time are met, we find that the created, created by, modified, and modified by contents are combined in a control called createdmodifiedinfo. you cannot come up with one for demonstration. note that these fields are not available in the current data source for drag and drop.:
What should we do so that the creation time or creator can display the results as expected?
Here are the solutions:
D: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ template \ controltemplates \ defaulttemplates. ascx
Open the file, search for the keyword "createdmodifiedinfo", and find the following content:
< SharePoint: renderingtemplate ID = "Createdmodifiedinfo" Runat = "Server" >
< Template >
< Table Cellpadding = 0 Cellspacing = 0 >
< Tr > < TD Nowrap class = "MS-descriptiontext" ID = Onetidinfoblock1 >
< SharePoint: formattedstring Formattext = "<% $ Resources: WSS, form_createdby %>" Runat = "Server" >
< SharePoint: formfield ControlMode = "Display" Fieldname = "Created" Disableinputfieldlabel = "True" Runat = "Server" />
< SharePoint: formfield ControlMode = "Display" Fieldname = "Author" Disableinputfieldlabel = "True" Runat = "Server" />
< SharePoint: creationtype Runat = "Server" />
</ SharePoint: formattedstring >
</ TD > </ Tr >
< Tr > < TD Nowrap class = "MS-descriptiontext" ID = Onetidinfoblock2 >
< SharePoint: formattedstring Formattext = "<% $ Resources: WSS, form_modifiedby %>" Runat = "Server" >
< SharePoint: formfield ControlMode = "Display" Fieldname = "Modified" Disableinputfieldlabel = "True" Runat = "Server" />
< SharePoint: formfield ControlMode = "Display" Fieldname = "Editor" Disableinputfieldlabel = "True" Runat = "Server" />
</ SharePoint: formattedstring >
</ TD > </ Tr >
</ Table >
</ Template >
</ SharePoint: renderingtemplate >
Now, I think everyone knows what to do.
In SharePoint desinger, redefine the template of the control.
For example: < SharePoint: createdmodifiedinfo ControlMode = "Display" Runat = "Server" >
< Customtemplate >
< Table Cellpadding = "0" Cellspacing = "0" Border = "0" >
< Tr >
< TD > Creation Time: & Nbsp; </ TD >
< TD > < SharePoint: fieldvalue Fieldname = "Created" Runat = "Server" ControlMode = "Display" Disableinputfieldlabel = "True" /> </ TD >
</ Tr >
</ Table >
</ Customtemplate >
</ SharePoint: createdmodifiedinfo >
The final result is as follows:
Fieldvalue is really easy to use. The other several can be displayed in this way. You only need to modify fieldname.