Is this possible with the content block? where we can add a teaser on one page them the full description or article to a newer page? with a "more" or "read more" link without having to manually add a page and link to it?
Firstly, you'd need to either create a new field for the Teaser text or create a Controller function to chop off the actual Content value at some arbitrary point. (Sidenote: we use Teasers quite a bit on another CMS and I'd opt for the control the 1st option gives.)
Secondly, you'd have to create a new View for the Content Block so it would display a modified version of the getContent function, which would retrieve the Teaser info and append the "more..." link.
Thirdly, I think there would need to be a page_type created that would retrieve/display the full Content Block following the user clicking "more ..." without - as you correctly commented - having to create "manual" pages to achieve.
Anyway ... probably not much help, but I think those things would need to be done for this to happen.
I may take a shot at creating time permitting.
But I have reviewed the Calendar code for this which I believe should be very similar.
Like I said, we need this before moving to C5 for our small biz website, so I'll eventually create.
Have you tried building your own Block yet?
If you don't mind passing something like that on when you do make it let me know and I'll send you my e-mail. I need something like that for a website too!
Imagine trying to teach someone Photoshop in a day or two. I've been working with those packages a long time and I would still consider myself a neophyte. But even so, I wouldn't want to teach what little I know to my wife.
Anyway, I'm just learning PHP and jQuery myself, so it can be done. And I will certainly post any kind of "Announcement" Block for your (and others) consideration.
BTW, with regard to Calendar, I noticed that Andrew actually *does* create a new Page for each event (so that when you click, it routes you accordingly). It's just built auto-magically.
I agree I wouldn't want to teach someone photoshop. I'm not very good at it myself...
I noticed that andrew makes a new pages with each event... I'll take a look at the blocks code today too and see if I can't learn/figure out how to do something similar...
Thanks for everything.
But switching that package over to use page types instead of blocks is taking a bit longer than I expected, still probably a couple days away from having something I can show people...
As in, just pass the Block ID as a header variable and have a Block Reader page that pulls the Block info that was passed.
That's kind of how I'm thinking about it. Only problem I see there is pretty URLs. I'm sure it can be done with mod_rewrite, but unsure if C5-supplied mod_rewrite rules would accommodate for that kind of design.
What about implementing "read more" through dynamic HTML?
Say you had a content block (or probably some sort of custom content block) containing a long blog entry. When you first load the page, it shows
Here's the first sentence...
click here to read more
Here's the first sentence. And the second sentence. Third sentence. Blah Blah Blah.
Doing it this way would not require any extra pages, just a custom content block (I think).
Again, I don't even know if this would work, but I think I've seen examples of this online. Maybe I'll take a stab at it when I finish my current project...
There aren't really many instances where I can see this being an advantage over doing an actual page, though. I don't know of any CMS that does a read more link without loading an entire page. Joomla does it with an approach similar to what I suggested to split the output from the text area, but they're still using two different pages. They only show the short text in a page list view, and the full text on the actual page.
With Concrete, you should be able to do the same thing, but allow for more content types through blocks. So instead of just a content block, you could do say, two photos in the short version, then 10 photos and text in the full version. It wouldn't be very simple to do properly, but I'm positive the framework supports building that functionality.
What's the advantage to limiting the read more to only content blocks and not using full pages?
Rather than parsing the content for a string, you could do it as AJAX, and load the content as needed. There might be a slight speed advantage, if there's a lot of loading to do.
The suggestion of an expanding DIV would be very easy to implement using jQuery. In fact, jQuery supports an 'accordion' method that does exactly that. There is - however - something about that expanding / contracting thing that just bugs me. Not sure precisely what. Maybe it just leaves me thinking, "hey, there should be a full page loading when I click this".
Probably a byproduct of reading too many WordPress Blogs.