Wednesday, April 12, 2006

[blogger] "Read More!" - how to make it conditional?

Dear friends at Food Blog S'cool,

Thank you for your warm welcome the other day. I'm new at blogging and have been at it for about 3 months now. My blog has lots of technical problems and things to iron out and I look forward to learning here about how to make it a fun and easy food blog to navigate.

Here's my first problem:

My blog is has lots of photos, and I also like to write about food. Sometimes lots of both can get unwieldy on a front page. I decided that the last thing I want to do is make it a chore for my visitors to scroll all the way down to the bottom of the front page. I want the front page to be easy and pretty and have options to click, and although I'd love it if people read my written work, I don't want to force people to read or even spend their time scrolling down the front page if they don't have the time or desire to read it.

I've managed somehow (and I say this sincerely because I don't know how to do much) to put in the tags in for it to begin on the front page and continue with more text, recipes or more photos, when you click on the "read more!" button at the bottom of the post.

This is wonderful when there is more to read - but I somehow have made a mistake and the Read More! always shows up at the bottom of each post, even if there isn't anything more to read.

Can someone explain to me how make this show up at the bottom of the post only when there really is something more to read?

Thank you!

This Post was written by Lucy from Lucy's Kitchen Notebook


wheresmymind said...

I really dig your Blog Lucy!! Getting me super psyched for my trip to France in June :) If I might make one suggestion...I don't know much about blogspot, but I might consider making a smaller header seems a bit too large for the screen. In my other non cooking life, I'm a web just making a friendly suggestion :)

L Vanel said...

Thank you so much for the feedback. The header is 600 px wide. What's the best height/width ratio? I could I guess downsize the square and try putting it on one third of the header maybe with a block of color, some text, something like that. Your advice is well taken and I'll put some thought into this.

P.S. June is a very good month here.

William Conway said...

This is a bit of a tricky hack, so stay with me...

Blogger has 2 "buttons" that you can tweak when you're writing a post. The first controls comments on/off, if comments are enabled. The second allows you to turn trackbacks on/off, if they're enabled.

What these buttons do is set the condition for the "blogitemcommentsenabled" and "blogitembacklinksenabled" tags. Look in your template, and you'll see them before and after your comment code.

This basically means you can enable or disable anything in your standard format.

I leave this stuff alone for comments, but for backlinks, I use it to differentiate between 2 kinds of posts.

I have "utility" posts, which includes indexes, disclaimers and other related stuff; and "content" posts which includes day to day content, pictures and recipes.

On the utility posts, I don't want to show backlinks or post date and time. Check out my special reports index as an example.

I use the "BlogItemBacklinksEnabled" tag to frame what I don't want to be included in my utility posts.

You can see this in my template. I have those tags around the code that automatically inputs the date.

Note that if you don't have backlinks enabled, and you enabled them, you'll have to root through your template to remove the actual code that enables backlinks. I like to have them on item and archive pages, but not on the main page because it dramatically increases the load time.

This solution does have one problem. It means for any particular post that you have to decide if you want the "read more" code to be switchable, or if you want to have the backlinks switchable. You can't have both. That means that if you want to be able to turn the "read more" on and off, you'll always have to have the backlinks on (by removing the "BlogItemBacklinksEnabled" tags from around the backlinks code).

In my case, I don't need backlinks to my utility pages, so the code turns date, time, and backlinks all on or off.

I know this is confusing, but if you look at my template it will make a little sense.

You can e-mail me if you need more help.

L Vanel said...

William, thanks for your comment. You mean there's a button I can turn off "read more" when I don't want to use it? When I create a post?

William Conway said...

Not quite. You can trick blogger into using the button that controls backlinks into turning your "read more" code on and off.

When you write a new post, go to "post options" and it will give you the options to allow new comments for the post, to turn backlinks on and off and to adjust the date and time of the post.

When you turn on/off backlinks in the post editor, it looks for the "blogitembacklinksenabled" tags and turns on/off everything in between them. If you frame your "read more" code with these tags, they'll get turned on and off when you use that button on the post editor.

That way you can change if the post has a "read more" section or not.

L Vanel said...

William, thank you! With your help I have achieved the goal of disabling the "Read More" comments when there is nothing more to read! Yay!

1) I pasted the tags beginning and ending 'blogitembacklinksenabled'

around the line in my template that tells it to make the comment link and set my backlinks to 'enabled' in my controls.

This now gives me the option to turn it off in "post and comment options" when I create or edit the post.

I will think about backlinks later!

Thank you!

William Conway said...

Glad I could help!

The backlinks utility in blogger kinda sucks. It takes forever to generate the code on the page, and it doesn't really pick up as much as it should. That's why I use it on a limited basis on my blog.

L Vanel said...

I was just reading through the school archives and see that in January someone posted that another solution to this problem:

It is very simple: the little code you put at the end of your post telling it you have a short post instead of a long post. Solution is here:

L Vanel said...
This comment has been removed by a blog administrator.
qishaya said...

Original christian shoes are first category in alter. They are so much appealing louboutin shoes so, ample of women can not pause to get their hands on them. cheap christian louboutin However, these shoes are not economical. christian louboutin So adequate of women cannot present these shoes. christian louboutin heels Christian Louboutin Replica is presenting the textbook thing for these people. christian louboutin sandals It is present masses of fashionable shoes in an economical rate. christian pumps You know that unique shoes are posh to buy. christian sandals Nevertheless do not think that exchange a shoe with christian louboutin pumps magnificent create of top trait is hard. Now a time model are presented. louboutin pumps But if you hardship attribute cargo look discount christian louboutin for these replicas in a trustworthy position & set an order for your beloved shoes christian louboutin sale

Anonymous said...

vuitton bags
are an important part of fashion, the type of vuitton handbag
that a lady carries will affect the way her wardrobe looks, carrying vuitton handbags
made by popular designer labels has been very fashionable.

dingdang said...

Many may imitate the Tiffany uk
styling which dated back to 2009. "It is true that eBay did not itself sell counterfeit Tiffany earrings
, and that is in part why we conclude that eBay did not infringe silver earrings
mark". "But eBay did affirmatively advertise the goods sold through its site as Tiffany necklaces
These effective lida daidaihua
do not have any harmful side-effects. You get great discounts on your box of daidaihua
, the entire details and instructions to take these effective lida slimming
is clearly mentioned on the site, slimming capsule
that are easily available on the online stores. slimming capsules
are mostly safe and able but several affected and abortive articles actualize a bad name for all slimming capsule