Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Different Panels, Different Pages?

Asked Modified Viewed 3,107 times
T
TheGam
T
TheGam 10
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Hi All,

I realise that you can set groups and then panels appear or are hidden depending on whether you are in the group.

What I can't work out how to do, is so that you can have different panels on different pages. An example might be that all my pages have the main menu, but different areas then have different sub menu panels below?

If this is not availiable, is there a workaround or mod? Does it feature in the alpha version? Do other CMS's have this, if so, what ones?

Whenever I have manually done PHP pages I have always used this concept to have better navigation and also relevent adverts to the pages.

Many Thanks for any replies

Matt
0 replies

5 posts

M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

yes, that's possible with a small line of code, e.g.:

if(strstr("forum/", FUSION_REQUEST)){
   //Panelcode (will only be executed in the forum)
}

if(strstr("viewpage.php", FUSION_REQUEST) && isset($_GET['page_id']) && $_GET['page_id'] == 1){
   //Panelcode (will only be executed on the page with ID 1)
}
0 replies
T
TheGam
T
TheGam 10
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Fanatastic!! Thanks so much for your great response!!!

I assume if I make say a directory saying flowers :-) and use the first example and then pages made inside that dir will have that panel? If not I guess need to list multiple page numbers? What's the best code for multiple page numbers?

Top marks guys, knew it was worth asking the question before I tried another CMS.
0 replies
M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

other folders than forum are of course possible.
best way to check for multiple page numbers is in_array(), e.g.:
$ids = array(1,2,3,4,5,6,7,8);
if(strstr("viewpage.php", FUSION_REQUEST) && isset($_GET['page_id']) && in_array($_GET['page_id'], $ids)){
   //Panelcode (will only be executed on the pages listed in the $ids array)
}
0 replies
T
TheGam
T
TheGam 10
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Brilliant!!

As regards the flower question, I meant if the folder was \flower\index.php

then I created \flower\seed\index.php would that also have the panel as the url had the word flow in or would I need to do something else?

Thanks!!
0 replies
— 8 months later —
N
ntn
N
ntn 10
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

Hi Super Admin,
May I ask some question? If I want to show only "lastest news" in 'news?readmore=' is with above code how I do that add code in "lastest news" belove. Sorry I don't write English well.

Thank you.


<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
openside("lastest news");
$result = dbquery("SELECT * FROM ".DB_NEWS." ORDER BY news_datestamp DESC LIMIT 0,17");
if (dbrows($result) != 0) {
   while ($data = dbarray($result)) {
      $itemsubject = trimlink($data['news_subject'], 70);
      echo "".THEME_SPACE."".THEME_BULLET." <a href='".BASEDIR."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'>$itemsubject</a><br>\n";
   }
} else {
   echo "<center>".$locale['global_078']."</center>\n";
}
closeside();
?>
Edited by Josso on 02-01-2009 20:56,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 3 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet