Read More
Permalink
The calendar has the ability when you add a event and can click on the event after its been published to take you to a new page with the description on it.
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?
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?
thanks very much! I don't think I'm advanced enough to do this but I would like to try if anyone wants to give a newbie some guidance. If you or anyone else does create it please let me know because I will be needing it!
Thanks again,
b.lew
Thanks again,
b.lew
in my list are easy ... I just haven't messed with page_types yet, so I'm less sure of how to do this.
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?
--djn12313
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?
--djn12313
I've just done themes. I'd like to say I'm advanced enough for that but I'm probably not. I'd like to try or be guided in something like this for a learning experience but its hard to find people with patience that are willing to help out to that extreme. So I'm just going to keep learning as much as I can and hopefully will get that advanced someday!
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!
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!
OO programming is a difficult concept to master and I'm guessing most folks who have have been at it as long as you've been designing.
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.
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'm starting to pick up on OOP. I'd image it will take awhile for me to get any good at it but for now I'm at least happy that I can get around it and understand whats going on. I know how to use jquery plugins but I wouldn't know how to make one. I'll still with html, css, and OOP php for now ;) and just use jquery to jazz things up.
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.
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.
For the blog package I'm working on - a read more block for an area. If the area blocks are being displayed as a list of pages, the read more block type would break you out of the loop outputing the block items and show a link to the full page. If you were on the full page, it wouldn't show anything.
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...
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...
whether there is a solution for this that doesn't require individual pages?
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.
--djn12313
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.
--djn12313
This may not be what you're looking for, and it may not even work, but here's an idea...
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
TITLE
Here's the first sentence...
click here to read more
Then, when you click the link, it dynamically resizes the <div> containing the blog entry and fills in the missing text, through a bit of javascript, so that it looks like:
TITLE
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...
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
TITLE
Here's the first sentence...
click here to read more
Then, when you click the link, it dynamically resizes the <div> containing the blog entry and fills in the missing text, through a bit of javascript, so that it looks like:
TITLE
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...
You'd have to parse the content field for the block before you output it though. Put in something like %%READMORE%% in your text, then search for that to split into two fields and output it.
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?
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?
...but it would look pretty cool, especially if you expanded the <div> over time, so the user could see it enlarge :-)
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.
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.
to do it without full pages (at least, without full pages you can see in the Sitemap), is because some users (like us, for example) do many 'announcements' per month. And rather than those accumulating, I would rather the Content Block just have a Teaser and then auto-generate a Reader page.
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.
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.
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.
--djn12313