glFusion Wiki

Site Tools


Custom Templates per Topic

There may be times when you would like to present stories in a different format based on what topic they are associated with.

For the index display (summary view showing story intro text) - glFusion will look to see if a topic is selected (i.e.; you are viewing a single topic) or if it is the general index page.

General Index Page

As each story is displayed, glFusion will check to see if a custom template exists for the topic that the story is associated with (primary topic, not alternate topic).

Topic Index Page

glFusion will use the topic being viewed as the topic to search for custom templates.

Where do the templates go

glFuison will look for layout/themename/custom/storytext_topicid.thtml - if found, this template will be used to create the story.

      if ( file_exists($_CONF['path_layout'].'/custom/'.$base_template.'_'.$storyTid.'.thtml') !== false) {
          $storytpl = $base_template.'_'.$storyTid.'.thtml';
glfusion/styling/story_templates_by_topic.txt · Last modified: 2017/01/17 21:01 (external edit)