This question about Using an extension: Answered
Change ClassifiedTopicViewTemplate
Hi!
I use classification plugin. How can I change the
ClassifiedTopicViewTemplate ? - I want to show the content of a addtional data-field (that I added in the
ClassifiedTopic Form)
--
TomHorst - 01 Apr 2015
Do not modify the ClassifiedTopic form as that's going to break whenever the
ClassificationPlugin is updated.
Instead create a new TopicType and copy&paste from ClassifiedTopic into the new one. Then customize the new TopicType as required.
In more detail:
1. Create a new TopicType
MyCustomTopic
| *Name:*| *Type:* | *Size:* | *Values:* | *Description:* | *Attributes:* | *Default:* |
| TopicType | label | 1 | MyCustomTopic, ClassifiedTopic, CategorizedTopic, TaggedTopic, WikiTopic | topic type | | |
| <nop>TopicTitle | text | 75 | | enter a title for this topic | | |
| Summary | text | 75 | | short description or tagline | c | |
| Tag | tag | 30 | | keywords for this topic | c | |
| Category | cat | 1 | | categories this topic is field to | | |
| Text1 | text | 75 | | | |
| Text2 | text | 75 | | | |
| Text3 | text | 75 | | | |
2. Create a view template
... at TopicView
MyCustomTopicViewTemplate
%TMPL:INCLUDE{"Applications.ClassificationApp.ClassifiedTopicView"}%
%TMPL:DEF{"beforetext"}%%TMPL:PREV%
%RENDERFORDISPLAY{
exclude="\b(TopicType|TopicTitle|Summary|Category|Tag)\b"
}%
%TMPL:END%
3. Create am edit template
... at TopicView
%TMPL:INCLUDE{"Applications.ClassificationApp.ClassifiedTopicEdit"}%
%TMPL:DEF{"formdefinition"}%Applications.ClassificationApp.MyCustomTopic%TMPL:END%
%TMPL:DEF{"topictype"}%my custom topic%TMPL:END%
Optionally add another tab to the editor by adding
%TMPL:DEF{"formfields"}%%TMPL:PREV%
%TMPL:P{"detailstab"}%
%TMPL:END%
%TMPL:DEF{"detailstab"}%%TAB{"Details"}%
%RENDERFOREDIT{
exclude="\b(TopicType|TopicTitle|Summary|Category|Tag)\b"
}%
%ENDTAB%%TMPL:END%
--
MichaelDaum - 01 Apr 2015