Tags:
create new tag
view all tags

SID-01275: INCLUDE in every topic of a web

Status: Answered Answered TWiki version: 5.1.0 Perl version:
Category: CategoryTemplates Server OS: Last update: 14 years ago

I need to have some code such as a ratingplugin code at the end of every page/topic of a WEB. Apart from creating a topic with the code and using an INCLUDE in every topic, is there any global way to do this?

-- RonMascarenhas - 2011-09-19

Discussion and Answer

Simple solution: Create a WebTopicEditTemplate in your web and add the INCLUDE(s) you need. That way, every time a topic is created it will be based on that template, thus has an INCLUDE.

If you want to hide the INCLUDE you can define a custom view template, activate it in the WebTopicEditTemplate with a VIEW_TEMPLATE topic preferences setting. Details in TWikiTemplates. FYI, the user profile pages use this approach to show the user profile at the top of the page: Custom view template Main.UserViewTemplate, user profile template topic Main.NewUserTemplate.

-- PeterThoeny - 2011-09-19

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title INCLUDE in every topic of a web
SupportCategory CategoryTemplates
TWiki version 5.1.0
Server OS

Web server

Perl version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2011-09-19 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.