This question about Using an extension: Answered
How to change topic actions for individual topics with WEBCOMPONENT
Hello
I would like to change the topic actions offered to particular topics in order to simplify the page and remove features that would not be used.
For example for some topics would only need the
Attach
button
I see that
WEBCOMPONENT
could do this. If I have a web called
MyWeb
and a topic called
TopicActions
what should I put in the topic to limit the actions and how can I
use this in just a subset of topics of a given type.?
Thanks for any feedback
--
LlewelynJones - 01 Mar 2021
I could not get the WebComponent method to work. The Natskin doc says that a web component "MyComponent" is searched looking for
WebMyComponent
in the current web,
I created a WebMyComponent topic in the current web but this is ignored. I see others have had similar issues with this WebComponent feature
Support.Question1481
I managed to limit the action options by another way with a ViewTemplate by adding
%TMPL:INCLUDE{"view"}%
%TMPL:DEF{"topicactions"}%%USERACTIONS{format="$edit$sep$delete$sep$attach"}%%TMPL:END%
Another option is to use the
pattern
skin
--
LlewelynJones - 10 Mar 2021
Llewelyn - Sorry to take a while to see your question here. Regarding getting WebComponents working, take a look at
System/NatSkin#WebComponents
on your installation and then click on the link associated with the "TopicAction" component (e.g.
System.SiteTopicActions
). You can then copy this topic to either 1) the Main web to customize user actions across your entire site, or 2) to a specific web to customize user actions only for that web - in this case also renaming the topic to
WebTopicActions
. Then customize the
USERACTIONS
macro on that page to suit your needs.
I hope this description helps clarify how the
WEBCOMPONENT
set up works. Basically, it works around a series of topics whose names start with either "Site" or "Web" and then the component name. Then as NatSkin renders the associated page element (e.g. sidebar, menu, user actions, etc), it looks first for a relevant topic in the current web (e.g.
WebUserActions
), or then a locally customized site-wide version (e.g.
Main.SiteUserActions
), or then lacking either of those defaults to
System.SiteUserActions
.
The alternative approach you describe is most useful when you
only want to modify the user actions associated with topics using a particular custom view template.
--
LynnwoodBrown - 10 Mar 2021