Announcement

Collapse
No announcement yet.

Hiding Sections from unregistered users.

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

    Hiding Sections from unregistered users.

    I am building a site with several sections only visible to groups of registered users. I have created a new section link layout as advised in the V8 advanced user guide and using the following code:

    <Actinic:SHOWFORPRICESCHEDULE Schedules="2" HTML="<a href=<actinic:variable name="SectionPageName"/>><actinic:variable name="SectionName"/></a>"/>

    This works fine except for 2 problems:
    1. Although the section is hidden in main display area it still appears in the left hand product section listing. ( Smart Theme )
    2. The hidden section link text appears without the corresponding image.

    I am exploring various layout options etc to find a solution but if anyone has an idea on this I would be gratefull.

    Eric

    #2
    Are you using act_section_tree.js for your left hand product selection list, if you are I have a edit for the javascript located in actextras.js.
    Richard Smith
    www.hamradio.co.uk

    Comment


      #3
      Hi Richard,
      Yes I am using act_section_tree.js so would be pleased to see your edit for actextras.js.

      Thanks
      Eric

      Comment


        #4
        Sorry for the delay, I've been quite busy!

        Replace this code in actinicextras.js:
        Code:
        function YahooSections(ar,cat) {
        	var strIDs = '';
        	for (var i=1;i<=ar.length;i++) {
        		if (ar[i].sURL != null) {
        			if (i == cat) { }
        			else {
        				strIDs += '<ul class="products"><li><a href="' + ar[i].sURL + '" class="product_section">' + ar[i].sName + '</a></li></ul>';
        				strIDs += '<div class="dotted_line_blue"><img src="theme_shim.gif" height="1px" width="1px"></div>';
        			}
        		}
        	}
        	return strIDs;
        }
        Replace this code for the act_section_tree.js list:
        Code:
        <script type="text/javascript">document.write(YahooSections(section_tree,'9'));</script>
        Replace the number with the setion numbers your trying to hide (check act_section_tree.js) to find the relevant number.

        Any problems, just shout.
        Richard Smith
        www.hamradio.co.uk

        Comment


          #5
          Hi Richard Thanks for the coding, as yet I have not managed to get this to work but will persevere and recheck my processes.

          Out of general interest I have found a simple way to achieve a similar result using themes not using act_section_tree.js eg Executive =

          Settings> Site Options> Links> Appearance Settings> Include List of Top Level Sections set to false.

          This removes all sections from left hand menu list and the hidden/unhidden sections appear in main frame as dictated by the individual section settings for registered user groups. This works OK but not ideal as all sections are removed from left menu list.

          Comment

          Working...
          X