Admin pages list

tevart

Avatar: tevart

2010-09-08 08:49

Hello!

Is it possible to have subpages in admin hidden until you click on a certain page or maybe to have a + sign to open subpages? The problem is, that i will be having more than 100 subpages and it will be hard to navigate.

Any idea?

tnx

» Quick.Cms v2.x

Makaron

Avatar: Makaron

2010-09-08 14:37

You can add them display:none; attribute in css file and You will have to prepare JavaScript function which will change this attribute if You click specific link. I prepared this modification once. But it is not so simple and I can't give You prepared solution. You can look at function displayTab() in file core/common-admin.php it works in the same way to show tabs field on right side.

Mak-Web.pl - Modyfikacje skryptów Q.Cart i Q.Cms

boboo

Avatar: boboo

2010-09-08 14:52

Makaron,
You mean: common-admin.js
;-)

tevart

Avatar: tevart

2010-09-08 20:26

Tnx..i will try to work with jquery and see where this takes me :)

boboo

Avatar: boboo

2010-09-17 07:31

OK,
it took an hour of think work and 10 minutes of writing code.
Tevart,
the solution is simple and "dirty" but the result sees only the admin.
I added a link to the Id-number (left side in admin-pages-panel).
So if you click on this Id, its children- & subchildren-pages appear (if present).
Another "main" pages stay closed.
If you click on another "main"-Id, its children wiil appear, another will be closed.
The solution:
In /templates/admin/pages.tpl in section BEGIN LIST
find:
$aData[iPage]

and exchange this with:
<a href="?p=p-list&amp;iMainSite=$aData[iPage]">$aData[iPage]</a>

In core/pages-admin.php in function listPagesAdmin
find:
if( isset( $this->aPagesChildrens[$aData['iPage']] ) )

and exchange this with:
if( isset( $this->aPagesChildrens[$aData['iPage']] ) && $GLOBALS['iMainSite'] == $aData['iPage'] )

Thats all.
Explanation:
As you can see, by clicking on the Id, we send the iPage (number) to the global var iMainSite.
Than, by listing the pages, the listSubpagesAdmin will be only called if the parent Page has childrend AND if its number is the clicked one.

tevart

Avatar: tevart

2010-09-22 12:10

Yep...it works like a charm. I was loosing my brains with jquery (i'm not a programmer), but this is so simple...i can't thank you enough.

Is it also that easy to include subpages of subpages? So subpages of subpages are also hidden if you dont select a subpage id?

tnx tnx

boboo

Avatar: boboo

2010-09-22 12:16

:-)
If you are lucky with this solution, so as a "thank you", zou can send me a nice photo-postcard (with a nice view from your town or environment) to the address:
http://skupienie.kimla.de/?regulamin,4
on this site in point 6. you'll find my address.

I will think about the sub-sub-sub pages ;-)

http://skupienie.kimla.de/?software-quickcart,106

tevart

Avatar: tevart

2010-09-22 17:23

Hehe...so if i understand correctly you want me to send you picture from my town? I sure can do that :)

tnx again

Back to top
about us | contact