How to add panel_right to a page with no side panels

Post

Posted
Rating:
#587 (In Topic #122)
Avatar
Standard member
Malatesa is in the usergroup ‘Well-settled’
Do I have this correct?

A Composr zone can have one Panel_Right and one Panel_Left. That means that in a particular Zone, every Panel_Right and every Panel_Left will be visually the same for every Page in that particular Zone. So if you have a Zone with a start page and 5 other pages, every one of those pages will have an identical Panel_Left and Panel_Right because there can only be one Panel_Left and one Panel_Right per Zone. So pages in a Zone will share a common Panel_Right and Panel_Left.

But if that's true, then how can several different Pages in the same Zone, have different Right and left side panels?

So, if I wanted my main start page to have a unique Panel_Right and Panel_Left, then I would need to create a new Zone for that unique start page?

If that's correct, then if I wanted to create a unique right panel or left panel on a page, but I didn't want the panel to be shared with any other page, then I'd just use a div to split the page into columns?


 
Online now: No Back to the top

Post

Posted
Rating:
#588
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
What you could do is like…

Code

{+START,IF,{$EQ,{$PAGE},page1,page2}}
...
{+END}
{+START,IF,{$EQ,{$PAGE},page3}}
...
{+END}

page1 and page2 will have something, page3 will have something else, and everywhere else will have no panel.

Or you could indeed do away with the concept of panels, and just designed a columned layout within the pages themselves. That's harder though, simply because the default theme isn't laid out like that.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
#589
Avatar
Standard member
Malatesa is in the usergroup ‘Well-settled’
If I go with the div method and just divide a page into a large left column and a small right sidebar, I'd want to make sure it used the correct classes so that it would still be mobile device friendly. There might even be some comcode for this, but I haven't found it yet. I did find some classes that look like good candidates for splitting a page into two columns (instead of just hacking together a set of divs):

global_side_panel
panel_right
global_middle_faux
global_middle
and a few others…

If I just edit a full page and insert this code…

<div id="panel_right" class="global_side_panel" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar">
   <div class="comcode_page">
      right side content goes here
   </div>
</div>
It does split the page into a large left side and a sidebar on the right. But is that mobile-friendly? And also, I worry that this method might actually just be splitting a middle div class (which was always intended to be a full page layout div) into two pieces, which is to say…

Code

(full page div)
   (right panel div)
   (end right panel div)
(end full panel div)   
Which works, but it probably is very bad code because the left column never seems to have a div that I'm confident is in order. But what I want is…

Code

(container)
   (left big panel)
      stuff
   (end left big panel)
   (right small panel)
      small stuff
   (end right small panel)
(end of container)
Is it smarter to use divs or is it smarter to just declare a unique zone to create a one-page-use sidebar?
If the divs method is better, is there a common implementation (sort of)  design template for this?
Online now: No Back to the top

Post

Posted
Rating:
#591
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Why not use the Tempcode solution I showed, it's a whole lot simpler.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Chris Graham)
#595
Avatar
Standard member
Malatesa is in the usergroup ‘Well-settled’
I hijacked your code…

{+START,IF,{$EQ,{$PAGE},page3}}
and used it in a way that I feel good about. It works REALLY well. Thank you for your help and advice. RC9 has gone so well that I even wrote a minimodule today. It's great software and a lot of fun to work with.

mp.jpg
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Manu, John Connor, Vaiva, Salman, ManojSree, amit.nigam, gabriel58, babu, mytracker

Forum statistics:
  • 1,298 topics, 5,830 posts, 7,064 members
  • Our newest member is flour2door
Birthdays:
Back to Top