• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Switching Template

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic