E1 Pages section

adeel

VIP Member
Hello there

In my E1 page under section I am using following below

+section:collapsible:My List

when page loads it is always open/expand by default. Is there a way to default to close or collapsed the section?


Thanks
 

Stewart Schatz

Well Known Member
Try adding the following <script> section above the </head> tag in the home.html file created when you run the generatePages.bat file. Then, replace the <body> tag with the one below.

<script type="text/javascript">
function ssCloseAllSections() {
for (i=1;i<=5;i++) { /*** 5 represents the number of sections we have ***/
/*** Find the sections using the element ID ***/
if (document.getElementById('flowHeader'+i+'_text')) {
/*** Use the supplied function to Collapse each section ***/
doExpandCollapse(document.getElementById('flowHeader'+i+'_text'));
} else {
break;
}
}
}
</script>

<body onload="javascript:init();ssCloseAllSections();" onresize="javascript: dynamicallySizeSpacers();dynamicallySizeComponent();">

Hope that helps!
 

adeel

VIP Member
Thanks Stewart

I tried with that solution but nothing happening with I run the home.html locally. I was looking more prebuild function for generatepages so that way I don't always need to hack the home.html file but still love know to know what causing your solution not to work


Thanks
 

adeel

VIP Member
Hi Stewart

Please find attachment as requested. I made simple and based on the counter iteration 5 you defined in your code

Thanks
 

Attachments

  • home.zip
    2.2 KB · Views: 18

Stewart Schatz

Well Known Member
Line 55 of your home.html there is a space where there shouldn't be one:

'flowHead er'
'flowHeader'

You can also remove the following from the <body> tag:

dynamicallySizeComponent( );

If you have any other questions, please let me know.
 
Top