By rossta7@yahoo.com on
Somewhere in the documentation I read where I can insert a tag (like <break />:) to indicate where to break the content between the introduction, and the remaining body text. Now I've searched everywhere, and even looked thru the code, and I can find it. Can someone help?
Comments
<--!break-->
The delimiter that node.module uses to indicate the end of the teaser text is
<!--break-->.Use teasers optionally?
I wonder if it is possible to break up a node into teasers and main body OPTIONALLY. I mean I would normally want the complete content to be visible on the front page regardless of its length. So I normally have to keep teasers disabled. However, in certain articles, I would like only the teaser to show.
So even if I have teasers disabled, is it possible to still break up my stories into teasers if I use
<!--break-->?--
Sandip Bhattacharya
http://www.sandipb.net
Optional teasers
I have implemented it as such on my site www.humourauthority.com:
1) Edit node.module, find this code:
The default setup of node.module is to
What I've done is to change the order of the last two choices by swapping out the code, and now the order is as follows on my site:
My site is now set up to the default of 600 characters for trimming posts, but as it looks for the delimiter *before* the size is taken into account, it works perfect for me.
The only problem this approach has is that if you want to display the entire body of the text, your text must end with the delimiter after the text, otherwise a few minor problems occurs:
Hope this helps.
Kobus
good idea
This sounds like a great little hack, and I'd like to try it. But for those of us who aren't php inclined, could you give the new code, after your alteration?
Optional teasers
Actually wouldn't making teasers totally optional solve the problem of having to add the <!--break--> at the end of posts?
In other words:
I haven't actually examined the code but you get the idea I hope.
This is what I would like to see implemented.
set length to unlimited and use <!--break-->
This should do the trick:
Go to administer >> content >> configure >> length of trimmed posts
and set Length of trimmed posts to Unlimited
Now by default the entire body of your posts will appear on the front page. If you want to cut it off at a certain place just add <!--break-->
My Drupal-powered Blog: ThoughtfulChaos - Varun's Blog