exponential.earth / exponential / documentation / building an ez publish site / the guestbook / creating the content class
These documentation pages are no longer maintained. Please visit the new documentation site.
Since eZ publish doesn't have a built-in content class that is 100% suitable for our guestbook needs, we'll simply build our own. Let's say that for each guestbook entry, we would like to store two things:
Use the administration interface to build a content class called "Guestbook entry". If you're not used to creating custom classes, read the "Assigning the news folder to the news section" section again.
Make sure that the class is built up of a "text line" and a "text field". The text line will be used to store the name/nick of the person who submits an entry. The text field will be used to store the entry itself. Make sure that the text line is the first attribute and call it "Name". Let the identifier be "name". The second attribute (the text field) should be called "Entry" and its identifier should be "entry". The guestbook doesn't have to be searchable, so feel free to turn off the searchable options. Make sure that both attributes are required. The length of the first attribute should be limited to 32 characters. The "Preferred number of rows" of the second attribute should be set to 15.
Finally, make sure that the anonymous role has read access to the newly generated content class. If you're unsure about this, read the "Assigning the news folder to the news section" section again.
Comments