HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[SOLVED]Panels and the page

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#48108 (In Topic #10528)
Avatar

Community saint

The current theme I'm working on requires the use of the right panel as well as four boxes side by side across the bottom of the page. I would like theses boxes to span the entire width of the page but as it sits, they will only extend to the right panel. So, question is:

  1. Work with the FOOTER.tpl as this portion and it's CSS extend the width of the page?
  2. Use either table tags or div tags to create my layout in :start and do not use the left or right panels at all? (simulate the panels)

I'm inclined to look at the second option as I also have a need to have certain menus appear on certain pages. I haven't figured out how to do this yet in OCP (not sure if it's possible), but I could do this using option #2.

Thoughts?

TIA!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#48113
Avatar

I'd actually suggest making a panel_bottom.
In HEADER.tpl you'll find…

Code

   {$SET,panel_top,{$LOAD_PANEL,top}}
Under it add an equivalent for a panel_bottom:

Code

   {$SET,panel_bottom,{$LOAD_PANEL,bottom}}

In GLOBAL.tpl you'll find:

Code

   {+START,IF,{$GET,show_top}}{+START,IF_NON_EMPTY,{$GET,panel_top}}
      <div id="panel_top">
         {$GET,panel_top}
      </div>
   {+END}{+END}
and you'll see just above it a div is opened. Copy and paste the code I just identified to just above where that same div is closed (almost at the end of the template file). Change references to 'top' to 'bottom'.

Now you need to make a panel_bottom. I suggest you base it off the panel_top. That has some Tempcode in it that hides the existing panel_top so it only shows on certain pages and it sounds like you need the same.

You'll probably want to set up some redirects (Admin Zone, Structure, Redirects), similar to already exist for the panel_top.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#48121
Avatar

Community saint

Hi Chris! Great suggestion and it sound just like what I'm looking for. Unfortunately, I'm having some difficulty getting this panel to load. Here are my steps:

1) Modify HEADER.tpl:

Code

   {$,Preload all the panels so that the CSS and JS is known for them}
   {$SET,panel_top,{$LOAD_PANEL,top}}
   {$SET,panel_bottom,{$LOAD_PANEL,bottom}}
   {$SET,panel_left,{$SET,interlock,_false}{$LOAD_PANEL,left}{$SET,interlock,_false}}
   {$SET,panel_right,{$SET,interlock,_false}{$LOAD_PANEL,right}{$SET,interlock,_false}}
2) Modify GLOBAL.tpl:

Code

   {+START,IF,{$GET,show_bottom}}{+START,IF_NON_EMPTY,{$GET,panel_bottom}}
      <div id="panel_bottom">
         {$GET,panel_bottom}
      </div>
   {+END}{+END}
3) Create my panel: New comcode page, cut and paste contents of panel_top and save as panel_bottom.

4) Add a redirect for Site to Welcome (I'm using the unified welcome/site interface for this deployment)

At this point, I cannot get the panel to show. I've accessed it directly via URL and all is good. I've also tried removing the comcode from the panel_bottom, but no joy. I have pasted the GLOBAL.tpl panel_bottom code lines all over the place, including just below where panel_top is being loaded (*grin*, lots of divs in that file), but still being shy. Have I missed anything?

TIA!!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#48123
Avatar

It's probably the Tempcode in panel_bottom telling it now to show. The code in panel_top defines it to show just on a few pages – IIRC rules, forum pages, the recommend page.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#48124
Avatar

Community saint

I did try via stripping all the comcode out of my panel_bottom, but no luck. I'll keep hunting!

Here is my current panel_bottom:

Code

[block="_community" type="top"]side_stored_menu[/block]WHERE AM I?
[block]main_comcode_page_children[/block]


Last edit: by SoccerDad

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#48125
Avatar

My mistake..

Code

   {+START,IF,{$GET,show_top}}{+START,IF_NON_EMPTY,{$GET,panel_bottom}}
      <div id="panel_bottom">
         {$GET,panel_bottom}
      </div>
   {+END}{+END}

(we didn't define a show_bottom - so just leave show_top in)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#48126
Avatar

Community saint

Yah!!! Thanx Chris, that was the ticket!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#48128
Avatar

Community saint

One final question on this topic Chris if I may: the tempcode from panel_top, is it save to assume I can use that same (but modified) code to control the appearance and disappearance of menus in the right panel based on the page being viewed?

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#48129
Avatar

yes


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#48132
Avatar

Community saint

Thanks kindly!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#56000
Avatar

Community saint

Hiya Chris! Has this behaviour changed in 4.2.x? I've copied everything from a working site (4.1.x) to a work in progress (4.2.x) but I cannot get the panel_bottom to show….

TIA!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#56009
Avatar

Hi,

It should still work. To debug I would use this GLOBAL.tpl code temporarily…

Code

a   {+START,IF,{$GET,show_top}}b{+START,IF_NON_EMPTY,{$GET,panel_bottom}}c
      <div id="panel_bottom">d
         {$GET,panel_bottom}
      </div>
   {+END}{+END}

Which of "a", "b", "c" and "d" shows should give a clue. For it to work you should see all.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#56011
Avatar

Community saint

Hi Chris! Righto, tried the code and it looks like we're getting to "a" and no further. I've attached a screenshot as well as the relevant "view source" from Firefox. I have tried with IE 8 and Opera, same.

It would appear however that OCP is parsing everything from a tempcode point of view. Removing the right bracket on the second END directive got it very upset and OCP threw me a critical error. I've also tried changing the IF_NOT_EMPTY to IF, no change.

The only other thing I can think of to include is that the installation I'm working with has been upgraded from 4.1.10ish, but it is not the same one I was working with when beginning this thread.

View Source:

Code

   <div class="medborder medborder_box staff_actions">
      <span class="control_functions">
         
         Control functions
      </span>:
      
      <a accesskey="q" rel="edit" href="http://www.tedzplace.ca/cms/index.php?page=cms_comcode_pages&amp;type=_ed&amp;page_link=%3Astart&amp;redirect=http%3A%2F%2Fwww.tedzplace.ca%2Fsite%2Findex.php%3Fpage%3Dstart&amp;redirect=http%3A%2F%2Fwww.tedzplace.ca%2Fsite%2Findex.php%3Fpage%3Dstart">Edit this page</a>
   
   
      | <a rel="add" href="http://www.tedzplace.ca/cms/index.php?page=cms_comcode_pages&amp;type=_ed&amp;parent_page=start&amp;page_link=%3A">Add child page</a>
   

   </div>

   <br />


         </div>
      </div>
a   
   </div>
     
   
</div>

<div class="bottom float_surrounder">
   <div class="bottom_under">
      <div class="global_bottom">



Here's the relevant HEADER.tpl as well:

Code

   {$,Preload all the panels so that the CSS and JS is known for them. Technically not needed (pre-processing would get it) but this also increases the efficiency.}
   {$SET,panel_top,{$LOAD_PANEL,top}}
   {$SET,panel_bottom,{$LOAD_PANEL,bottom}}
   {$SET,panel_left,{$SET,in_panel,_true}{$SET,interlock,_false}{$LOAD_PANEL,left}{$SET,interlock,_false}{$SET,in_panel,_false}}
   {$SET,panel_right,{$SET,in_panel,_true}{$SET,interlock,_false}{$LOAD_PANEL,right}{$SET,interlock,_false}{$SET,in_panel,_false}}
   
   
   {$CSS_TEMPCODE}


Last edit: by SoccerDad

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#56012
Avatar

Ah sorry I missed something.
Put this into HEADER.tpl:

Code

   {$SET,show_top,{SHOW_TOP}}
We took that out, but it's still needed by the code I wrote for you here.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#56014
Avatar

Community saint

and also needed by the panel_bottom by the looks of it! ;-) Thanks Chris, as always, topnotch.

Code

   {$,Preload all the panels so that the CSS and JS is known for them. Technically not needed (pre-processing would get it) but this also increases the efficiency.}
   {$SET,panel_top,{$LOAD_PANEL,top}}
   {$SET,panel_bottom,{$LOAD_PANEL,bottom}}
   {$SET,show_top,{SHOW_TOP}}

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: