Professional Web Applications Themes

Template Expressions in Library Items? - Macromedia Dynamic HTML

Hi All, The quick question is this: can template expressions be made to work inside library items? Here?s the situation? The page: http://www.fretbank.com/basics/intervals/index.html I have a 3-tier template structure in place ? 1-Root, 2-General Page Structure, 3-Topic Categories. If you look at the page, I have buttons below the header that point to different topics. Each topic has several pages. All of the pages from each topic are child-pages from a specific Tier-3 template. The buttons use template parameters/expressions on the Tier 3 temp. to determine the state of the button. I currently have to copy the code for the ...

  1. #1

    Default Template Expressions in Library Items?

    Hi All,

    The quick question is this: can template expressions be made to work inside
    library items?

    Here?s the situation?
    The page:
    http://www.fretbank.com/basics/intervals/index.html

    I have a 3-tier template structure in place ? 1-Root, 2-General Page
    Structure, 3-Topic Categories.

    If you look at the page, I have buttons below the header that point to
    different topics. Each topic has several pages. All of the pages from each
    topic are child-pages from a specific Tier-3 template.
    The buttons use template parameters/expressions on the Tier 3 temp. to
    determine the state of the button.

    I currently have to copy the code for the button nav into each topics template
    and any changes have to be made in each template. I am going to be adding many
    more topics and want to find a shortcut. I guess I could make a 4th template
    tier and have each of the category templates be children of that, but I?m
    hoping to avoid this. It would be easiest to be able to make a library item and
    paste it where I need.

    I thought about using SSI?s but that wouldn?t work with the expressions. Any
    other suggestions?

    Thanks,
    Troy

    Fret Guest

  2. #2

    Default Re: Template Expressions in Library Items?

    > The quick question is this: can template expressions be made to work 

    No.

    But, there's not much use for Library items in templates, either.
     

    You don't mean nested, right? You just mean three separate templates?
     

    Hmm - wouldn't do it that way at all. CSS seems like the optimal way to do
    this, and it just happens to be the way I do all such menus.

    In addition, your construct for these buttons is completely wrong -

    <a href="../index.html">
    <div class="tab-off-L">Music Basics</div>
    <div class="tab-off-R">&nbsp;</div></a>

    You cannot put a <div> inside an <a>, which is why you aren't getting the
    right pointer for them.

    Finally, why you are using a Library item inside the non-editable portion of
    the Template, instead of just placing that code directly in the Template?

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
    ==================


    "Fret Man" <com> wrote in message
    news:g1mmid$9ca$macromedia.com... 

    Murray Guest

  3. #3

    Default Re: Template Expressions in Library Items?

    Thanks for the reply Murray.

    A couple clarifications and questions. Sorry for the length, but I felt it was
    better to be clear than concise.

    I am using nested templates.

    Since I posted the topic, I have changed my structure a bit, trying to find a
    balance between flexibility and work load.

    I have a root template with has headers and common includes.

    From the root template I nest multiple MAIN CATEGORY templates for primary
    areas of the site. These templates contain the nav buttons just below the
    header.

    From the MAIN CATEGORY temps I nest several SUB CATEGORY templates for each
    topic in the category, which contain the code for the "Quick Nav" box at the
    bottom of the page.

    The individual pages of the site are then built from the sub category pages.
    The reason for all of the nesting is this: The MAIN CATEGORY temps contain the
    code for the nav buttons and are built using temp. expressions that look to a
    main category param on each of the sub category pages. Depending on the
    param., the button that corresonds to which Main Category you are in will be
    black (via CSS class)

    One the sub cat. temps the Quick nav link relative to which page you are on
    will be black (also via CSS class)

    This allows me to only have to change each of these nav. elements on one page.
    All of the different MAIN CAT. temps allow me to focus advertising based on
    the subject. Maybe there is a better way to populate the ads to different
    categories that I am not aware of? Is there a way to have the button/links
    reflect the category/page you are on using only CSS? I don't want to have to
    copy and paste changes to multiple pages when the nav/topics change.

    ****
    I put the <a> tags inside the <div> tags, based on multiple people telling me
    that I shouldn't do it the other way around. I hadn't encountered any problems
    and liked that the whole button became a link. Is having the link outside the
    div a problem in older browsers? I tested it this way in IE7, Firefox2.0,
    Safari, and Opera, and it worked.


    Fret Guest

  4. #4

    Default Re: Template Expressions in Library Items?

    > Is having the link outside the div a problem in older browsers?

    It's invalid HTML. That's enough for me. And I suspect it would be a
    problem somewhere, as you are trying to make the entire <div> tag a link.
     

    I would opt for a single template structured so that changes to CSS could
    'specify' the particular section layout. Then I would choose server-side
    includes for the navigation elements, and place them into strategically
    placed editable regions of the single template, depending on which section
    you are needing to navigate.

    Having only a single template is not only possible, it's MUCH simpler than
    nesting them.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
    ==================


    "Fret Man" <com> wrote in message
    news:g1po3c$kd5$macromedia.com... 

    Murray Guest

Similar Threads

  1. Library Items in Contribute
    By robbieraven111 in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: July 29th, 01:09 PM
  2. Library Items Help Please
    By rookie404 in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: October 10th, 01:27 PM
  3. Library Items
    By Neotoxic.com in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: April 10th, 11:11 AM
  4. possible for publishers to edit Library Items /recurrent items like navigation?
    By zu in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: June 16th, 06:59 PM
  5. possible for publishers to edit Library Items / recurrent items like navigation?
    By cmitchell in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: March 5th, 12:50 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139