Creació |
06
des.
2015
|
Activitat |
06
des.
2015
|
The following steps will help you create a Best Practices context within your web site.
Follow the usual steps creating a context. Edit _internal/context.xml
and add this element tag within elephant-context:
<element id="20091021131026676" type="dossiers"> <attrib name="sclass" value="" /> <attrib name="categoryId" value="0" /> <attrib name="dossierId" value="0" /> <attrib name="count" value="10" /> <attrib name="onlyDossiers" value="false" /> <attrib name="summaryTemplate" value="questions" /> <attrib name="fullTemplate" value="question" /> <attrib name="restricted" value="false" /> <attrib name="issueTypes" value="TYPE_BESTPRACTICE"/> </element>
Now, you have a context that lists all issues typed as Best Practice. In case you want to restrain best practices scope, you can indicate a category or a dossier. Since the restricted attribute is set to false, the list will show all publishable best practices.
Both, summary and full templates, are provided. Feel free to copy and play around with styles, fields and edit permissions.
From the Best practices context, create a new child named Edit. Create a new content by adding this macro:
{@edit-question:{@param:item}:[best_practices_context]?item={@param:item}:TYPE_BESTPRACTICE}
Notice you have to replace [best_practices_context]
with your own context.
Do as you normally do when creating a new issue, but this time select Best Practice as issue type. Now you can edit the best practice from the recently created context.
Best practices are created as normal issues, simply typed as a Best Practice. When you edit de best practice text, a copy is stored in the issue, as to track text modifications, but also to help search engines to find description text. The copy is stored as readable plain text.
Best practices created in such a way, support the normal flow of issues. For example, in case you want to ensure Best Practice quality, you could mark as non publishable the issue, put yourself as Quality Assurance and turn on the publishable attribute after verification.
Some more magic
Following the same rules, you can create a FAQ context. Change TYPE_BESTPRACTICE
with TYPE_QUESTION
. Surprisingly, the ok hand image will be substituted with a question circle. The secret in the supplied templates.
bestpractices.zip
This context's configuration
|
2.7 KB | 6/12/15 |
editQuestionTemplate.html
Editor template
|
1.6 KB | 6/12/15 |
questionsTemplate.html
List template
|
2.6 KB | 6/12/15 |
questionTemplate.html
Full page template
|
3.5 KB | 6/12/15 |