Create an advertising page

I want to create a page called admin/advertise. and the advertise button is present inside the navpill. nav nav-pills section. but whenever i try to make this there is a routing error is there. how can I solve this.

1 Like

I moved your post to a new topic because I didn’t think it was related to Discourse Templates. I think you are trying to add a new route to your Discourse site. Is that correct?

Any details that you can share about what you are wanting to do would be helpful. Possibly someone on this site will have some suggestions for alternate ways of approaching the problem.

1 Like

yes I want to create a new page for the advertise tab present in my nav-pills. i want the same functionality and structure for advertise also as the other nav-pills have.

2 Likes

I’m not the best source of information about this, but the only maintainable way I’m aware of to add a new page to Discourse is to create a plugin that adds a route. It it was my site, I’d try to find another way of solving the problem. If you want to pursue it, have a look at this 6 part guide: Developing Discourse Plugins - Part 1 - Create a basic plugin.

This section of the guide demonstrates how to create a route: Developing Discourse Plugins - Part 5 - Add an admin interface. Note that the example code is creating an admin route. Regular users will not be able to access it. That type of page could be useful for allowing admins to configure a plugin.

2 Likes