This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JForum and the fly likes Change theming by looking at URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Change theming by looking at URL" Watch "Change theming by looking at URL" New topic
Author

Change theming by looking at URL

robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
I'm currently using JForum as downloaded from site (not JForum2).

Well, I was going to ask, can I get at the URL in a template? So I can change theming on some pages? However, give me a quiet 10 mins and I trace back, read documentation, and here's the base activity in a line (placed in a template),



Onwards I go, lurching into the unknown (2 days with Java)...

Comments welcome.
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
A little expanded. Probably not a good idea to include URL data directly (not looked at the class documentation yet),



(not convinced about these code tags yet. Maybe not using it right...)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

I think you are looking for ${JForumContext.encodeURL('/forumUrl')}. It will make the path of that URL appropriate for your instance of JForum.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
jQuery in Action, 2nd edition
 
subject: Change theming by looking at URL
 
Similar Threads
tag handling
Struts2 - Need to change the value of style element of s:textfield dynamically using local variable
Struts2 form tags
Where does /struts/ in the url come from? and where does it resolve to?
problem designing jsp using struts 2.0 tags