Page 1 of 1

How to create side bar

Posted: Sat Feb 10, 2018 11:38 am
by Bishu

Normally when we use Horizontal Menu
the body between header and footer where our table are showing has only 1 column.

I would like to have 2 column here
first one will be the left bar where i can put some important link or advertisement
second will be the body where our table are showing.


Re: How to create side bar

Posted: Sat Feb 10, 2018 12:38 pm
by kirondedshem

put your jquery in globa startup scripts, inspect the page to seehow the divs look and find out how and where to put your div for the sidebar, after, write jquery to put your sidebar div after the site loads.

ALTERNATIVELY you can use page_foot event to create your own jsrender template to do the same, you can read about it in help menu.


Re: How to create side bar

Posted: Tue Feb 20, 2018 12:22 pm
by Bishu

on the Page_Foot - I wrote jquery to create a side bar as

$("<div id='LeftContent' class=LeftContent'><p>New Left Content</p></div>").prependTo($(".content-wrapper"));

But it does not work.


Re: How to create side bar

Posted: Tue Feb 20, 2018 1:03 pm
by mobhar

Please note that in "Page_Foot" server event, you are only allowed to put the html code or jsRender template (see about this from PHPMaker Help menu).

If you want to use jQuery code, you should put it under "Client Scripts" -> "Global" -> "Pages with header/footer" -> "Startup Script".

Please read "Server Events and Client Scripts" topic from PHPMaker Help menu for more info and example.