Sectionwide areas, building pagelists and problems adding new page templates
Permalink
Hi all,
Currently developing a 110-page multisite for a Danish political party and have a few questions that I was wondering if you could help me out with:
Firstly, I want to generate a pagelist like this:
And I want it to happen without needing an editor to mess with the pagelists. For this to work, I need to develop one (or two) custom templates, right? That are hardcoded to traverse up the tree (find parents' parent) and find all children or something like that. Am I on the right track?
Also, to make this more efficient (both resource & UX-wise), shouldn't I implement them as section-wide pages, as described here:http://concrete5tricks.com/blog/sectionwide-areas/?... There are other places where section-wide areas make sense. Or maybe global areas if I make more page types/templates - so instead of a page type called "person" I'd have one for each "person type" (Senator, Rep, etc.) with same layout, but a global area as a sidebar. I assume I just have to pick a solution and stay with it, but off-hand I see more benefits of implementing section-wide areas. Do you agree?
On that note, I'm having difficulties adding a new page template in 5.7 - I make a page_template_name.php file in Elemental, but it doesn't show up under Elementals "Page Templates" under "Themes". It works flawlessly on my 5.8 beta though, so I don't know if there's a different thing I should be doing it in 5.7, it seems like a trivial thing, but I get no error message, and I seem to be doing everything right, so I'm stumped. Any ideas?
Thank you all in advance!
Currently developing a 110-page multisite for a Danish political party and have a few questions that I was wondering if you could help me out with:
Firstly, I want to generate a pagelist like this:
- Bloguniverse (custom page type) - *Page in pagelist 1 - *Page in pagelist 2 - Blog (Simply Blog page type) - Blog entry 1 with sidebar of two pagelists that display: Pages with * & Latest 3 blog entries - Blog entry 2 with same sidebar
And I want it to happen without needing an editor to mess with the pagelists. For this to work, I need to develop one (or two) custom templates, right? That are hardcoded to traverse up the tree (find parents' parent) and find all children or something like that. Am I on the right track?
Also, to make this more efficient (both resource & UX-wise), shouldn't I implement them as section-wide pages, as described here:http://concrete5tricks.com/blog/sectionwide-areas/?... There are other places where section-wide areas make sense. Or maybe global areas if I make more page types/templates - so instead of a page type called "person" I'd have one for each "person type" (Senator, Rep, etc.) with same layout, but a global area as a sidebar. I assume I just have to pick a solution and stay with it, but off-hand I see more benefits of implementing section-wide areas. Do you agree?
On that note, I'm having difficulties adding a new page template in 5.7 - I make a page_template_name.php file in Elemental, but it doesn't show up under Elementals "Page Templates" under "Themes". It works flawlessly on my 5.8 beta though, so I don't know if there's a different thing I should be doing it in 5.7, it seems like a trivial thing, but I get no error message, and I seem to be doing everything right, so I'm stumped. Any ideas?
Thank you all in advance!
Thank you very much for your great response. I really appreciate it.
1. Perfect, just wanted to make sure I was on the right track. I've modified my description of it, I know it wasn't that great, but I think I know how to accomplish what I want to now, so thanks!
2. Yes, I think section-wide areas might be good. I'm in doubt about one thing though - so say I want the same section-wide sidebar for 10 "senators", with the same lists - except a CSS .class change that highlights current page. I assume since the section-wide sidebar runs the same view.php-file, the "current" page changes as well. Instead of asking you, I should try that out. I'm gonna go do that.
3. Yes, core Elemental theme - just for now, to test it out, while we're working on a c5-theme from scratch. HTML/CSS/JS is almost finished and we're converting it to a custom theme next week. When I modify 5.8 core Elemental theme, it shows up in 'Page Templates' instantly.
Thanks again!
1. Perfect, just wanted to make sure I was on the right track. I've modified my description of it, I know it wasn't that great, but I think I know how to accomplish what I want to now, so thanks!
2. Yes, I think section-wide areas might be good. I'm in doubt about one thing though - so say I want the same section-wide sidebar for 10 "senators", with the same lists - except a CSS .class change that highlights current page. I assume since the section-wide sidebar runs the same view.php-file, the "current" page changes as well. Instead of asking you, I should try that out. I'm gonna go do that.
3. Yes, core Elemental theme - just for now, to test it out, while we're working on a c5-theme from scratch. HTML/CSS/JS is almost finished and we're converting it to a custom theme next week. When I modify 5.8 core Elemental theme, it shows up in 'Page Templates' instantly.
Thanks again!
2. If you want to add class for current page on right sidebar - you can just compare sidebar page it to current page.
3. I have never used concrete5 core theme, because I made my own basic/reusable theme. But I think I read somewhere on forums, that core template have some quirks/problems (like you need to create another template file in core folder (which of course is bad idea). But don't trust me on that for 100%.
foreach ($sidebarPages as $sidebarPage) { if ($sidebarPage->getCollectionID()==$c->getCollectionID()) { echo 'class="active"'; } }
3. I have never used concrete5 core theme, because I made my own basic/reusable theme. But I think I read somewhere on forums, that core template have some quirks/problems (like you need to create another template file in core folder (which of course is bad idea). But don't trust me on that for 100%.
2. Yeah that was what I had in mind.
3. I tried making a basic theme and that fixed things, so you were right about it being a stock theme problem - thanks!
3. I tried making a basic theme and that fixed things, so you were right about it being a stock theme problem - thanks!
2. Both solutions are good. Which is better depends, what do you want to put in that global/section-wide area.
If you have to create pages for multiple senators/reps and every senator/rep has different content I would go for those "secion-wide areas" (for example: every senator has it's own portrait photo on his personal pages)
Global areas would be ok, if there was only one senator/one rep etc. or every senator/rep has the same content in global area (for example: logo of party/recent site-wide news etc.).
For those examples I assumed every senator's page would have child pages like "Gallery", "About" or similar.
3. Are you trying to modify core elemental theme or one from marketplace?