Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

How do I change the html of a page in my theme?

ToddTodd Chief Product Officer Vanilla Staff
edited June 2011 in Releases
A lot of people ask questions of the sort "how do I change this text" or "that html?" Most all of the html that Vanilla displayed is stored in views and the beauty of these views is that they can be overridden in your theme.

Here's how you do it, and I'll use the example of changing your discussion's rss feed.
  1. First you have to create a theme. Let's say you name your theme MyTheme.
  2. You need to find the view that displays the rss feed. In this case it's in /applications/vanilla/views/discussions/index_rss.php.
  3. Copy the view's file to your theme's folder. It has to have the same subpath as the original view. So in this case you'd copy the file to /themes/MyTheme/views/discussions/index_rss.php.
  4. Edit the copy of the view and your theme and it will display your changes.

How do I find the view I want to override?

If you want to find the view to override you usually just look at the url of the application. So in our example above you know that to view the rss of the discussions you go to /discussions/feed.rss. You need to know that Vanilla is the application all discussion and comment related activity Then you can just look on the /applications/vanilla/discussions folder to see what view might be appropriate.
xVal
Sign In or Register to comment.