discourse/lib/plugin
Jarek Radosz 2a4df93b8e
FEATURE: Allow to modify topic-backed static pages (#15324)
A plugin API that allows customizing existing topic-backed static pages, like:
faq, tos, privacy (see: StaticController) The block passed to this
method has to return a SiteSetting name that contains a topic id.

```
add_topic_static_page("faq") do |controller|
  current_user&.locale == "pl" ? "polish_faq_topic_id" : "faq_topic_id"
end
```

You can also add new pages in a plugin, but remember to add a route,
for example:

```
get "contact" => "static#show", id: "contact"
```
2021-12-16 04:24:11 +01:00
..
filter.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
filter_manager.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
instance.rb FEATURE: Allow to modify topic-backed static pages (#15324) 2021-12-16 04:24:11 +01:00
metadata.rb DEV: Remove customer flair from being an official plugin (#15315) 2021-12-15 22:30:50 +08:00