feed
Permalink
I need a events page and i need the home page to pull in the top 3 events from the events page... is this at all possible?
I was told it was with list type block but i have no idea where to find that at...
Here is the link... as you can see i have 2 different entries and i need the first couple to appear in the top right corner.
http://crcc.turnpostadmin.com/index.php/events/...
I was told it was with list type block but i have no idea where to find that at...
Here is the link... as you can see i have 2 different entries and i need the first couple to appear in the top right corner.
http://crcc.turnpostadmin.com/index.php/events/...
if this isn't possible let me know. I imagine i'll get more of a response when 5.3 comes out ;)
You would want to make your events page a parent page of a bunch of other pages, one for each event.
Then on your home page, add the Page List block. Choose to display pages underneath another page, and select your parent events page. Sort the posts by date, and limit it to 3 pages only.
Does that help or do you need screenshots?
Then on your home page, add the Page List block. Choose to display pages underneath another page, and select your parent events page. Sort the posts by date, and limit it to 3 pages only.
Does that help or do you need screenshots?
can i get some screenshots I'm sorry! thanks so much for helping me out!
Should help you get the idea. First, make sure that you have an actual hierarchy for your pages, probably you want to do that from the site map in your dashboard. You will want to add the pages before adding the block on your home page. See screenshot 6
Once you have an events page and a couple of pages for the dates underneath it, go to your home page and add another block. Scroll down the list of blocks until you see one called page list. See screenshot 7
Display <<3>> pages
Choose for location, choose 'beneath another page' and then click on Select Page.
(8 & 9)
Change the value for sort pages to 'with the most recent first'
Click 'Provide RSS Feed' if you would like people to be able to subscribe to changes in your page list.
Once you have an events page and a couple of pages for the dates underneath it, go to your home page and add another block. Scroll down the list of blocks until you see one called page list. See screenshot 7
Display <<3>> pages
Choose for location, choose 'beneath another page' and then click on Select Page.
(8 & 9)
Change the value for sort pages to 'with the most recent first'
Click 'Provide RSS Feed' if you would like people to be able to subscribe to changes in your page list.
It works thanks for all the help! Is there any way to display the content? right now it just displays the title of the page and I want it to display a short summary as well with a more link to the actually article.
You can put the description in your page properties and show a short paragraph summary, but not a preview of the page. There are a lot of posts around here about using it for what you are, some searching should help you out...
If anyone there has any advice please let me know... I'm starting to get a bit nervous about this...
if you put something in the short description, the page list will automatically show that.
if you define custom attributes on the pages you're listing, its pretty easy to get content out of them through the page list block..
it is not as easy to look up specific blocks on the sub pages. it's possible, but its gonna take some recursive PHP and its not the brightest call when it comes to performance.
if you define custom attributes on the pages you're listing, its pretty easy to get content out of them through the page list block..
it is not as easy to look up specific blocks on the sub pages. it's possible, but its gonna take some recursive PHP and its not the brightest call when it comes to performance.
isn't there a way to do a php tag that will pull in the latest three items of the database?
Dude, what's been listed here will totally work - why are you talkin about php tags and direct access to databases?
Just use the page list block, populate your short descriptions, point the block to a sub page and enjoy.
-frz
Just use the page list block, populate your short descriptions, point the block to a sub page and enjoy.
-frz
because the company doesn't want the client to have access to add new pages he just wants them to be able to add content. Thats why I needed the updates to come from the content id's I thought that might work.
but, I'll try to figure it out. thanks anyways...
but, I'll try to figure it out. thanks anyways...
well just give em a content block then.. im not sure i get it, where do these things link to? if they link to a detail page, doesnt someone have to make it?
If I just give them the content block though the events block won't update.
check it out,
http://crcc.turnpostadmin.com/index.php/events/...
There are 2 different content blocks in the middle of the page. (content blocks/area).
I want the block right now set as page type in the top right hand corner called "events" to update every time a new content block is added. I hope that makes more sense. I don't want it to update when a new page is added. I want it to update when a new content block is added.
right now its pulling in sub pages. That I created under the about us page... and that works just fine. but I want it to update with the content instead of the pages.
So instead of saying the test pages "test, test2, test3" I want it to say "Event One and short description, Event Two and another short description" like what I have in content area of that page.
check it out,
http://crcc.turnpostadmin.com/index.php/events/...
There are 2 different content blocks in the middle of the page. (content blocks/area).
I want the block right now set as page type in the top right hand corner called "events" to update every time a new content block is added. I hope that makes more sense. I don't want it to update when a new page is added. I want it to update when a new content block is added.
right now its pulling in sub pages. That I created under the about us page... and that works just fine. but I want it to update with the content instead of the pages.
So instead of saying the test pages "test, test2, test3" I want it to say "Event One and short description, Event Two and another short description" like what I have in content area of that page.
really i am past being able to follow..i think the cold and 5.3 launch has the better of me...
uhh. no you can't automatically update one part of the page by adding a block to another.. certainly you might build a custom block that you called in two places like that, but nothing exists in the box along those lines..
if you are making sub pages for these events, i really think you could let your clients to that, just here, and just these types of pages. and your page list block would work super duper for it..
uhh. no you can't automatically update one part of the page by adding a block to another.. certainly you might build a custom block that you called in two places like that, but nothing exists in the box along those lines..
if you are making sub pages for these events, i really think you could let your clients to that, just here, and just these types of pages. and your page list block would work super duper for it..
It sounds like you could get what you wanted using advanced permissions, or possibly even the standard permissions, but you also may just want to lock up that page list in the template with php code like this:
you can call any block like this and manually set it's options.
<?php $bt = BlockType::getByHandle('page_list'); $bt->controller->num = 3; // pages to display $bt->controller->orderBy = 'display_asc'; $bt->controller->cParentID = 1; // cID of the page that's above the pages you'd like to list $bt->render('view'); ?>
you can call any block like this and manually set it's options.
I don't want to use the page list block at all... i just want the events at the top right corner of the site to update with the content block from the events page. so they are the same thing but i only want the top one to show the first 2 or 3 events. I don't think the page list block will help me at all with this because i don't want to list pages at all i want to list whatever events that are in the content block on the events page.
no worries franz i know you had a long week and I'm sorry to bug ya about this.. i just need to get this site out the door. Great job on the 5.3 release by the way... the new CMS kicks ass!
no worries franz i know you had a long week and I'm sorry to bug ya about this.. i just need to get this site out the door. Great job on the 5.3 release by the way... the new CMS kicks ass!
are the people adding events to the events page able to be trusted to reorder them as well? I get the whole idea that an event ie. drink free at Moe's this day and go to AA in Tuesday aren't worthy of their own page.
If you can assume that the order of the events would be correct then that isn't a huge deal...but otherwise you need to rely on page (collection) created dates and have that spaced out there seperately.
You could also go with a timestamp on block types to collections which concrete5 might do and sort based on that, but this seems like if you don't want to use the page-list a bit of a 3-4hr problem.
If you can assume that the order of the events would be correct then that isn't a huge deal...but otherwise you need to rely on page (collection) created dates and have that spaced out there seperately.
You could also go with a timestamp on block types to collections which concrete5 might do and sort based on that, but this seems like if you don't want to use the page-list a bit of a 3-4hr problem.
They will be able to use the "move" function to order the content blocks accordingly and also add the content blocks to the page. I don't see how adding content has anything to do with the page-list block.
maybe I'm way off here but if they are going to add the events (content) with the content block and if the events at the top of the page show the top 2 newest events that were added to the content block then we wouldn't need a page-list.
I don't want each event to have a new page but I want each event to have a new content block on the events page. I want the newest 2 or 3 events (content blocks) to show at the top part of the website . I hope that makes sense.
Sorry for bugging everyone! I sure to appreciate the help though!
maybe I'm way off here but if they are going to add the events (content) with the content block and if the events at the top of the page show the top 2 newest events that were added to the content block then we wouldn't need a page-list.
I don't want each event to have a new page but I want each event to have a new content block on the events page. I want the newest 2 or 3 events (content blocks) to show at the top part of the website . I hope that makes sense.
Sorry for bugging everyone! I sure to appreciate the help though!
then that wouldn't be a problem to do, but it is a bit of custom code basically a get all blocks on an area of a cID and grabbing their content.
I think that is what I'm talking about. How would I go about doing that... I would like to try that to see if it works the way I'm thinking.
http://www.concrete5.org/help/building_with_concrete5/developers/mvc/scripting_common_concrete5_tasks/
bit of code there that can be generally helpful :)
I know coding is kind of rough and i glazed over it for the longest time, but it really isn't that bad if you have the boss drop a hundred or so on some books for you.
bit of code there that can be generally helpful :)
I know coding is kind of rough and i glazed over it for the longest time, but it really isn't that bad if you have the boss drop a hundred or so on some books for you.
I'm getting a error on the page from this code and I don't know why...is it even possible?
$contentBlocks = array();
$c = new Page::getByPath('/events');
$blocks = $c->getBlocks("main");
foreach($blocks as $b) {
if ($b->getBlockTypeHandle() == 'content') {
$contentBlocks[] = $b;
}
}
is this possible ? to call all the content blocks from the main part of the site from the events page?
then can i just limit it to 3 post the top 3?
$contentBlocks = array();
$c = new Page::getByPath('/events');
$blocks = $c->getBlocks("main");
foreach($blocks as $b) {
if ($b->getBlockTypeHandle() == 'content') {
$contentBlocks[] = $b;
}
}
is this possible ? to call all the content blocks from the main part of the site from the events page?
then can i just limit it to 3 post the top 3?