How to create side bar

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Bishu
User
Posts: 427

How to create side bar

Post 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.


kirondedshem
User
Posts: 642

Post 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.


Bishu
User
Posts: 427

Post 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.


mobhar
User
Posts: 11660

Post 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.


Post Reply