Results 1 to 2 of 2

Thread: tiles/velocitylayoutview and header titles

  1. #1
    Join Date
    Dec 2004
    Posts
    29

    Default tiles/velocitylayoutview and header titles

    For several times I've run into the Tiles or VelocityLayoutView references and I thought to myself - that's cool, I want to try it out.

    The only stopper for me is that I don't know how to elegantly specify the header title in the page.

    Example:
    Code:
    <!-- Layout in layout.vm -->
    <html>
    <head><title>$&#123;title&#125;</title></head>
    <body>$&#123;content&#125;</body
    </html>
    
    <!-- Page Content Template in index.vm -->
    <p>Hello there!</p>
    Now I don't see how I can specify $title variable, so that it would be rendered properly in layout.vm.
    I'd like to specify it right in index.vm, not in the Controller/Model, not in the Spring's -servlet.xml too

    If I just do this in index.vm:
    Code:
    #set&#40;$title = "Title1"&#41;
    <p>Hello there</p>
    It still won't work right, because layout has been rendered before the #set directive executed.

    Any advice/hints would be greatly appreciated.

  2. #2

    Default

    I'm battleing the same problem.

    Did you ever figure anything out? I'm thinking of possibly overloading the VelocityLayoutView class to handle the parameters I need but that is going to be messy

Similar Threads

  1. Replies: 1
    Last Post: Oct 10th, 2005, 05:12 PM
  2. Custom Authorization Header
    By jslongo in forum Security
    Replies: 1
    Last Post: Sep 20th, 2005, 06:13 PM
  3. Replies: 0
    Last Post: Jun 16th, 2005, 02:39 PM
  4. Replies: 9
    Last Post: May 12th, 2005, 07:51 PM
  5. Unable to set BASIC authentication header
    By general_pattonm in forum Security
    Replies: 6
    Last Post: Mar 10th, 2005, 05:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •