You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 13-04-2013 22:01:49

donator
Contributors
Registered: 11-04-2013
Posts: 28

Example sidepanel

Perhaps it's a stupid question:

I want to use sidepanels and made changes to

- sidebar.php
- example.php

There are only effects to be seen which I have done in sidebar.php.
Changes in example.php have no effect :-(

Can somebody help me?
Thanks

Last edited by donator (13-04-2013 22:02:32)

Offline

#2 13-04-2013 23:38:54

Emil
Moderator
From: in a shipyard
Registered: 15-03-2013
Posts: 106

Re: Example sidepanel

First, let's make a test to see if the default workflow on how to change/edit the sidebar works for you:
We'll assume you have a default installation. Please use latest stable version of Chrome to view result of this test.
1) In config/sidebar.php there are two sidebars("an_example" and "some_info"). Add this code to the end of the file:

$sidebar["my_test_sidebar"] = array("pos"=>"left","size"=>2,"full_height"=>false/*<- this sets wether the sidebar should be the full page height or not*/,
	"tiles"=>array( /* Open the array of sidebar tiles */
	
 array("type"=>"custom","group"=>0,"x"=>0,"y"=>0,'width'=>1,'height'=>1,"background"=>"#11528f","url"=>"typography.php",
"content"=>
"<div style='line-height:30px; margin-top:35px;'>
<div style='font-size:57px;line-height:30px;'>TEST</div>
</div>"),

	"load_plugins"=>array() /* Load plugins from the plugin folder so you can use tileplugins */
);

2)go to panels/example.php and replace this line:

showSidebar("an_example");

with this line

showSidebar("some_info");

Also, add more margin-top to the p tag (for example

<p style='margin-top:450px;'>See the source how we've put this sidebar in a panel!</p>

so it does not ends under the flip and accordion tiles...but this is optional for this test)

3) test the "some_info" sidebar by activating it from the navigation (by clicking on the tile in first group).

4) go to panels/example.php and replace this line:

showSidebar("some_info");

with this line

showSidebar("my_test_sidebar");

5) test your "my_test_sidebar" sidebar by activating it from the navigation (by clicking on the tile in first group). The sidebar space should refresh (in case it does not, try Shift+F5) in case you did not close the webpage but anyway it should work.
I have tested this.

Last edited by Emil (13-04-2013 23:40:16)


Good advice is often confusing, but example is always clear.

Offline

Board footer

Powered by FluxBB