Way to use JavaScript in a content block?
Permalink
Hi guys, I'm trying to implement a "blog-on-the-side" if you will on my C5 website...but the issue I'm having is that since it's not designed specifically for this purpose, there are many drawbacks and obstacles preventing this (for me, anyways).
Anyways, one of the main thing I notice right off the bat is that there's no way to manage how much content is displayed. I have a JS script that basically allows for the use of an expand/collapse button, which would allow me to display say the first paragraph of a blog entry, and users could expand the rest if they wish to keep reading...otherwise, the content is limited to only showing the first paragraph for each blog entry, so that it takes up less page space (another issue with C5 not being ideal for "blogging" - no way to archive content).
I know there's a plugin/addon for being able to add a PHP-content block; does such a thing exist that will allow me to use JavaScript within a content block?
Anyways, one of the main thing I notice right off the bat is that there's no way to manage how much content is displayed. I have a JS script that basically allows for the use of an expand/collapse button, which would allow me to display say the first paragraph of a blog entry, and users could expand the rest if they wish to keep reading...otherwise, the content is limited to only showing the first paragraph for each blog entry, so that it takes up less page space (another issue with C5 not being ideal for "blogging" - no way to archive content).
I know there's a plugin/addon for being able to add a PHP-content block; does such a thing exist that will allow me to use JavaScript within a content block?
That would be fantastic...any idea when it might be ready? I'm not in a rush, it's not for anything important, but yes I think this would definitely be beneficial! :D
mostly done. eager to move on.
should be next week.
should be next week.
Man, I've been working the last couple of days trying to use writing a blog as a way to learn how to plan and write packages better :(
I've been writing up the process here:
http://www.werstnet.com/index.php/code-samples/concrete_blocks/blog...
For your particular problem, I would suggest a page list with a custom template. You could add in the javascript at the top of the template, something like showing and hiding the next item with jQuery should be a really simple script.
Here's how I changed the custom templates for my blog post pages and the page list display on the side:
http://www.werstnet.com/index.php/code-samples/concrete_blocks/blog...
Even if there is an official block coming out, I'm still probably going to finish my blog package just to get the experience writing a package :)
I've been writing up the process here:
http://www.werstnet.com/index.php/code-samples/concrete_blocks/blog...
For your particular problem, I would suggest a page list with a custom template. You could add in the javascript at the top of the template, something like showing and hiding the next item with jQuery should be a really simple script.
Here's how I changed the custom templates for my blog post pages and the page list display on the side:
http://www.werstnet.com/index.php/code-samples/concrete_blocks/blog...
Even if there is an official block coming out, I'm still probably going to finish my blog package just to get the experience writing a package :)
Just got busy with C5 a couple of days, really lovin' it! The onl thing I need for my site to be complete is a blog.
Frz mentioned it'll be done in week. Is it done? Cause if it is, I can't find it..
I'm really psyched about this feature.
Thanks
Frz mentioned it'll be done in week. Is it done? Cause if it is, I can't find it..
I'm really psyched about this feature.
Thanks
Just to kinda echo stieren - I'm looking forward to seeing the blog block as well. Is there an updated ETA? I was considering building my own, but if one is already in the works...
we're just trying to wrap up 5.3.1 bug release. the blog stuff is all there around it and will be packaged up next. If not today, quickly there after.
might make your life easier.