Announcement

Collapse
No announcement yet.

I need help with a CSS layout question.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • I need help with a CSS layout question.

    Now that we have the ability to have multiple frame.html pages set, i am experimenting with trying to make an all CSS layout.

    The first thing im doing is trying to get everything in the Frame.html into its own <div> </div>.

    However, whenever i move any dynamic content into its own <div> it seems to break.

    For instance the menu links...
    PHP Code:
    <div><a href="infopage.asp?page=[link_id]" class="menu" target="[link_target]"> [link_name] </a></div
    Normally this line of code would return a list of menu links on the website, but when i put it into the <div> tag, it simply gives me " [link_name] " on the page.

    Any ideas?

  • #2
    Figured it out?

    I think i might have figured it out...

    For some reason the PHP code is using the "comments" which i thought were invisible to the computer...

    So This will NOT work:
    PHP Code:
    <div>        
    <
    a href="infopage.asp?page=[link_id]" class="menu" target="[link_target]"> [link_name] </a>
    </
    div
    And this WILL work:
    PHP Code:
    <div>        
    <!--
    STARTmenuitems_view-->
    <!--
    STARTTOP_LINK_FORMAT-->
    <
    a href="infopage.asp?page=[link_id]" class="menu" target="[link_target]"> [link_name] </a>
    <!--
    ENDTOP_LINK_FORMAT--> 
    <!--
    ENDmenuitems_view--> 
    </
    div

    Comment


    • #3
      Just curious why the comment lines make the code work?
      I thought comment lines were comment lines and thus; ignored?

      Comment


      • #4
        I dont know, but I do know it works...

        All the "main" pages on my site (www.nmteaco.com) now use a completely CSS based frame file. Now the next step is to turn the content pages into CSS as well.

        Comment


        • #5
          Originally posted by NMTEACO View Post
          I dont know, but I do know it works...

          All the "main" pages on my site (www.nmteaco.com) now use a completely CSS based frame file. Now the next step is to turn the content pages into CSS as well.

          Very nice! It's good to know that it can be done.

          Comment


          • #6
            We're surprised 3dcart didn't chime in on this one. Apparently, you need to include comment statement for the code to work with 3dcart.

            Comment


            • #7
              There is an explanation about how templates work here: (topic #1)

              http://www.3dcart.com/guide/
              ----------------------------
              Gonzalo Gil
              3dCart Support
              800-828-6650 x111

              Comment


              • #8
                Originally posted by Mark View Post
                Just curious why the comment lines make the code work?
                I thought comment lines were comment lines and thus; ignored?

                I'm assuming that the comment lines everyone's referring to are what 3dcart refers to as Code Blocks. If so, here's a link to the 3dcart support site regarding the code:

                https://support.3dcart.com/index.php...barticleid=149

                According to this page:
                *************
                Code Blocks and Field Names

                #1 – [FIELDNAMES]
                Using brackets to identify placeholders for variables, the template engine replaces these [FIELDNAMES] with the database values. Each page has a set of variables that can be printed, please revise the notes for each template to get a list of these.

                #2 – CODE BLOCKS
                The code blocks define a snippet of HTML which the software can then use to create a part of the page, and or, if no data exists, remove it from the page leaving the rest of the page intact.

                Here is an example of a Code Block:

                <!--START: BLOCKNAME-->
                Fieldnames go here…
                <!--END: BLOCKNAME-->

                ****************

                The article gives more indepth information about this.

                Comment


                • #9
                  Hey NMTEACO, did you ever find a way to make your sub-pages fully CSS-based? I checked your site and it appears not. The main problem for me is that creating a new subpage via the content management system gives you some tables that you can't get rid of.

                  The only way I can see is by simply creating HTML files from scratch and putting them on the FTP site and linking to them, but they would have to include all the outer frame info as well.

                  Comment

                  Working...
                  X