• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Switching Template

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to make a copy of the default template and then modify the new template files, images, etc. However, I can't figure out where I specify which template folder to use. Will default always be used, so we need to change files in there?

Also, is it possible to allow users to pick a template at runtime for use in their session?

Thanks.

--
jack
[originally posted on jforum.net by madjack]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

madjack wrote:I'd like to make a copy of the default template and then modify the new template files, images, etc. However, I can't figure out where I specify which template folder to use. Will default always be used, so we need to change files in there?

Also, is it possible to allow users to pick a template at runtime for use in their session?

Thanks.

--
jack


Copy the default template directory, then edit the files in your new directory. You can set the template to use in the SystemGlobals.prop file.

Users will not be able to choose between the templates, that is a system setting.

[originally posted on jforum.net by GatorBait3]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can make it a user setting if you modify the sql skripts, the userdao, and quite some other files to add the new field. then modify the template for the user profile so he can select the template (among the avaiable templates) and modify the sources for when the template is being chosen... so that he'll use either the default template or the user selected one ...

[originally posted on jforum.net by Sid]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You can set the template to use in the SystemGlobals.prop file.



What key do I use in the properties file? And when specifying the template as the value, do I just use the template subdirectory name or a path to the template directory?

Thank you both for the help.

--
jack
[originally posted on jforum.net by madjack]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

madjack wrote:

You can set the template to use in the SystemGlobals.prop file.



What key do I use in the properties file? And when specifying the template as the value, do I just use the template subdirectory name or a path to the template directory?

Thank you both for the help.

--
jack


Find this entry in the SystemGlobals.properties file:

# The template to use
template.dir = default


You only have to enter the name of the new directory you're using (under ../templates/). This change will be active when you save the file, you don't have to bounce your app server engine or restart the JForum app.
[originally posted on jforum.net by GatorBait3]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!