exponential.earth / exponential / documentation / building an ez publish site / the members page / member info page
These documentation pages are no longer maintained. Please visit the new documentation site.
This page will be used to display all the information that we have about a member. Currently, when a member is accessed (using one of the links from within the member list page), eZ publish displays all the attributes of that member using the default object view. The following list of steps explain what you should do to change this.
Append the following lines of code to the TSCM CSS file.
.member_info { border-style: none; font-size: 80%; }
Create a new override for the "/node/view/full.tpl" template.
Feel free to call it "full_view_member_class.tpl".
Set the override keys to the "Member" class and the "Member" section.
Replace the contents (if any) of the generated template file with the code provided below.
<div class="pagetitle"> Member information </div> <div class="imageleft"> {* Display a picture of the member. *} {attribute_view_gui attribute=$node.object.data_map.picture} </div> {* Display the attribute names and their values. *} <table class="member_info" cellspacing="4" cellpadding="3"> <tr> <td><b>{$node.object.data_map.realname.contentclass_attribute.name}:</b></td> <td>{attribute_view_gui attribute=$node.object.data_map.realname}</td> </tr> <tr> <td><b>{$node.object.data_map.nickname.contentclass_attribute.name}:</b></td> <td>{attribute_view_gui attribute=$node.object.data_map.nickname}</td> </tr> <tr> <td><b>{$node.object.data_map.birthdate.contentclass_attribute.name}:</b></td> <td>{attribute_view_gui attribute=$node.object.data_map.birthdate}</td> </tr> <tr> <td><b>{$node.object.data_map.gender.contentclass_attribute.name}:</b></td> <td>{attribute_view_gui attribute=$node.object.data_map.gender}</td> </tr> <tr> <td><b>{$node.object.data_map.phone.contentclass_attribute.name}:</b></td> <td>{attribute_view_gui attribute=$node.object.data_map.phone}</td> </tr> <tr> <td><b>{$node.object.data_map.email.contentclass_attribute.name}:</b></td> <td>{attribute_view_gui attribute=$node.object.data_map.email}</td> </tr> </table>
This code takes care of displaying member information in a nice way. The picture of a member is displayed at the left hand side. Information about the member (name, phone number, etc.) is displayed on the right hand side (prepended by the name of the attribute). Notice that the names of the attributes is not hardcoded in the template file. Whenever you decide to rename an attribute (for example replace "Real name" with "Name" - you will not have to bother with updating the template file. The following screenshot shows what the output should look like at this point.
Comments
It may help
Marat M.
Friday 06 May 2005 9:36:53 pm
Got it!
Fredrik ohrberg
Wednesday 29 December 2004 3:27:51 am