Announcement

Collapse
No announcement yet.

Sitemap layout in v8 (poor quality)

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

    Sitemap layout in v8 (poor quality)

    I recently made a posting about "how dow we change the layouts in v8 without losing everything" and one item that came up in here was that the v8 sitemap layout is very amatuerish.

    I was playing about with a sitemap last night and came up with a relatively easy way of changing the look and feel - thought I would share the idea with others. If I am teaching people to suck eggs, sorry, but reading the forum, there's a lot of people at the beginning of the ladder of re-designing actinic layouts.

    Some people might also say my formatting is naff, I'm only using this as an example to prove a point - in my case the formatting is "extremely simple" to show a point, no doubt others can change it suit their requirements.

    here goes.
    click on the "design tab" at the top of the "page preview" window
    find the word "</head>" on the layout code
    insert the following code JUST ABOVE the word "</head>"
    Code:
    <style type="text/css">
    <!--
     .sectLev0 {
    	text-align: left;
    	padding-left: 20px;
    	}
     .sectLev1 {
    	text-align: left;
    	padding-left: 40px;
    }
    .sectLev2 {
    	text-align: left;
    	padding-left: 60px;
    	}
     .sectLev3 {
    	text-align: left;
    	text-indent: 80px;
    	}
     .sectLev4 {
    	text-align: left;
    	text-indent: 1000px;
    	}
     .sectLev5 {
    	text-align: left;
    	text-indent: 1200px;
    	}
    -->
    </style>
    (I've included the style directly into the sitemap page, rather than an external file, because the actual styles will only ever be used within the sitemap page.)

    now click on the one of the page titles within the sitemap
    this should open up the "layout code" pane with the "Site Map Section Link" ( the code currently being used to do the layout )
    Highlight ALL of the code and CUT it out, place that code in notepad or something if you want.
    now replace the code with a new piece of code as follows:
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsSectionIncludedInSiteMap%22%20%2f%3e" >
       <a href='<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>'>
          <span class="sectLev<actinic:variable name="SectionLevel" />"><Actinic:Variable Name="SectionName"></span>
       </a><br />
    </actinic:block>
    now simply apply the changes and preview the page.
    and thats it.
    In my case, all it did was to indent the sections by 20px just to prove a point.
    Its up to you to change the layout styles to suit your site.

    for those interested, an explanation as to whats happening,
    in the original layout, actinic placed a single space for each of the levels of the site map., I've deleted all that code and replaced it with a bit of code that generates
    [CODE]<span class="sectLev"followed by the current section number followed by >SectionName</span>CODE]

    the actual generated code looks like this:
    Code:
    <span class="sectLev1">Test level 1</span>
    <span class="sectLev2">Test level 2</span>
    this allows CSS formatting to take place according to the section level, by adjusting the "padding-left" on each style, the indent can be increased or decreased to suit.

    so thats the concept, now its up to anyone else to play with the code.

    kev

    #2
    Kev, Could we see your end result please

    Comment


      #3
      Jo,
      Still in progress, it was the concept that I was playing with.
      leave it with me and I'll post a screen-pic soon

      Comment


        #4
        I've knocked up a typical layout with some dummy names to show multi-level indents, - see attached image.
        in my paticular case, I've played about with the style as follows:
        Code:
        <style type="text/css">
        <!--
        .sectLev0, .sectLev1, .sectLev2, .sectLev3, .sectLev4, .sectLev5 {
        	/* basic formatting to all levels */
        	text-align: left;
        	font-family: Geneva, Arial, Helvetica, sans-serif;
        	font-size: 16px;
        	font-weight: 500;
        	vertical-align: middle;
        	height: 30px;
        	}
         .sectLev0 {
        	padding-left: 20px;
        	}
         .sectLev1 {
        	padding-left: 40px;
        }
        .sectLev2 {
        	padding-left: 60px;
        	}
         .sectLev3 {
        	padding-left: 80px;
        	}
         .sectLev4 {
        	padding-left: 100px;
        	}
         .sectLev5 {
        	padding-left: 120px;
        	}
        -->
        </style>
        there is a basic style that applies to ALL levels and then a specific (padding) to each level

        when it comes to the actual layout code, I added the image for prettyness as follows:
        Code:
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsSectionIncludedInSiteMap%22%20%2f%3e" >
           <a href='<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>'>
              <span class="sectLev<actinic:variable name="SectionLevel" />"><img src="Sect.gif" border="0" width="16" height="16"/> &nbsp; <Actinic:Variable Name="SectionName"></span>
           </a><br />
        </actinic:block>
        I actually put the equivilent of three spaces between the image and words for a bit of padding.
        its easy to ammend the basic layout (the first style defintion) and then you just ammend the padding to suit your requirements.
        any gif changes, then just change the SRC="???" within the layout, don't forget to ammend the width and height of the image you use.

        I contemplated creating the small dotted lines we see within explorer, but I couldn't any way of identifying when one level starts and one level ends to put the correct dot-layouts (if this makes sense)

        I hope the layout and code proves useful to some people.
        kev
        Attached Files

        Comment


          #5
          The SiteMap list is very useful. I've just used it as a basis of a new dynamic menu. My new menu layout generates an UL type list that is styled by CSS to produce the menu effects. You just add this layout to a design and a dynamic menu appears.

          Unlike my previous JavaScript Act_section_tree.js based menus this one generates proper static HTML links on every page and is thus search engine friendly.

          Only drawback of this approach is that you're adding the entire list to every page so it won't suit sites with thousands of sections. When I tried it on a real-world site with 160 Sections, the resulting code added a tolerable 14Kb to each page.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            it was the detection of the various section levels to start and stop the <UL>'s that prevented me from using the lsit formats, although personally I would have preferred to do just that. - it would certainly made it more dynamic.

            so without the start/stop I just simply adapted the existing layout to padding-left=???

            How do you detect the start and stop of the levels ?

            Comment


              #7
              I used PHP.

              In the Start of list I have

              Code:
              <ul>
              In the End of list I have

              Code:
              </ul>
              In each list item I have
              Code:
              <actinic:block if="%3cactinic%3avariable%20name%3d%22IsSectionIncludedInSiteMap%22%20%2f%3e" >
              <actinic:block php="true">
              if ( <actinic:variable name="ListIndex" encoding="perl" selectable="false" /> == 1 ) $lastlevel = 1;
              $thislevel = <actinic:variable name="SectionLevel" encoding="perl" selectable="false"/>;
              if ( $thislevel > $lastlevel )
              	{
              	while ( $lastlevel < $thislevel ) 
              		{
              		echo "<ul>";
              		$lastlevel++;
              		}
              	}
              else if ( $thislevel < $lastlevel )	
              	{
              	while ( $lastlevel > $thislevel )
              		{
              		echo "</ul>";
              		$lastlevel--;
              		}
              	}
              </actinic:block><li><a href='<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>'><Actinic:Variable Name="SectionName"></a></li></actinic:block>
              Last edited by NormanRouxel; 04-Feb-2008, 12:52 PM. Reason: Fix for Actinic list creation buglet.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                experience, experience, experience.
                its clear you dip in and out of PHP to generate certain bits of code now that thats available in v8

                Comment


                  #9
                  we find the versatility of V8 far outweighs the incorporated code etc.

                  However, from a home user perspective, maybe something more would be nice (should I go into politics?)

                  We have added some gifs just to show the different types of pages, nothing fancy, but clean and concise.

                  After all, the map is for the user...

                  HTH
                  Regards
                  Affordable solutions for busy professionals.
                  Website Maintenance | UK Web Hosting

                  Comment


                    #10
                    couldn't agree more,
                    the aim of my "tutorial" (if indeed it was a tutorial) was to help those users that wanted to improve the very basic layout of the sitemap but didn't know where to start.
                    I see a big problem whereby we could go into some clever code and lose the new users after a few lines problem is, I'm not sure that would help the new user that has never really played with styling and changing actinic v8 layouts before.

                    I've played more with the concept of the site map, and I've now added a new property within the library (drop down type) to provide a selection of images that the user could then use for any section.

                    doing it this way, the user could then click on the section properties, choose the image from the list, the code would then interogate the value stored and then produce the correct image within the code.

                    I like the idea of the small images you've shown, perhaps you would post the code here to allow others to see how you did it.

                    Comment


                      #11
                      I'm confused....

                      I just implemented Normans PHP sitemap, but on hovering the links they all go through cgi-bin, wheras the original Actinic sitemap is hardcoded links

                      so why do i want to use Norm's solution - granted it looks better, but don't i really want simple links not cgi?

                      Comment


                        #12
                        Jo,

                        Is this a Business site? If so you'll be going through the cgi-bin when logged in.
                        Norman - www.drillpine.biz
                        Edinburgh, U K / Bitez, Turkey

                        Comment


                          #13
                          no, its simple catalog - well designer/client (me designer, my opo client cat)

                          surf-wax.co.uk/acatalog/sitemap.html

                          fuuny you should ask that as I changed the left hand nav earlier this week based on something you said about a particular nav creating html links but when i implemented it it was cgi so i reverted to what i already had

                          (and don't you dare mention windsurfing or bitez in your reply)

                          Comment


                            #14
                            Jo this link is exactly what Norman has put in this thread

                            http://kitesrus.co.uk/acatalog/sitemap.html

                            When i hover i get the static links, if i login (as norman states) it go's through cgi bin, i see what you mean on surfwax though????

                            D

                            Comment


                              #15
                              I've got a feeling that designer works as if it were business, therefore produces the cgi links... no that rubbish as you aren't signed in

                              it must be because its designer though?

                              Comment

                              Working...
                              X