By Robardi56 on
Hi,
is contemplate the best way to control cck teasers and presentation ? Or can it be achieved in another way ?
Cordially,
Brakkar
Hi,
is contemplate the best way to control cck teasers and presentation ? Or can it be achieved in another way ?
Cordially,
Brakkar
Comments
did yoı try excerp module?
did yoı try excerp module? if i got correctly it may help. http://drupal.org/project/excerpt
One CMS, Drupal, to rule them all :) www.universideliyiz.biz
what do you want to
what do you want to configure in the teasers? i find contemplate pretty good - i have a php script that allows me to set the exact teaser character length for each one, and you can theme it all you want
Would you mind sharing your teaser script for contemplate?
Thanks.
Lsabug
Sorry its taken a while to
Sorry its taken a while to track it down again - i've got files everywhere!
Its not mine, i'm afraid i can't remember where i found it on drupal but it's out there somewhere:
VARIABLE_FIELD = the variable you want to trim
0 = represents what character to start counting from
300 = represents the number of characters to trim to
I also add ...readmore with a link to the page path to illustrate the trimming but thats not required
Thanks stanbroughl for responding...
I'll try it out.
lsabug
Where...
Where do you insert this code? Into the teaser template? Because when I do, the readmore link only point to the front page where the teaser resides, rather than the page where the story is.
There's a bug, see here for
There's a bug, see here for the error report:
http://drupal.org/node/87223
I used this instead, for the 'read more' link
This will take you to the relevant node page rather than to front page. Also added the class of "more-link", which will style it like all other 'read more' links on your site.
<span class="more-link"><?php print l('... more', 'node/'.$nid, array('title' => 'Read more on this article')); ?></span>Alter the '... more' to read 'read more' or whatever alternate text you desire.
i've tried
I've tried using the php snippet provided and paste it to the "Teaser Template" of Contemplate. That's really work.
However, the trimming style is not what i'm looking for because it doesn't respect the "words" that's in the field.
For example, when the character to be trimmed is set to 300, the characters that reach exactly on 300 will be trimmed despite the completion of the word (i.e. world --> worl). Can we make it in such a way where the trimming process will respect the final word, let it finish the word before trimming it.
I hope I've made it clear on what I'm looking for. Any guide or help will be appreciated.
Thanks
When I made my custom
When I made my custom content type I included a description text field. That made it easy to separate as a teaser from the main content. I simply added the second code snippet from this thread to the description field div and removed the main content field from my teaser template. Presto I had a great teaser with a read more link. Obviously I set the description field to 300 characters in the settings for that field.
<span class="more-link"><?php print l('... more', 'node/'.$nid, array('title' => 'Read more on this article')); ?></span>Hope that helps you.
BTW: If you want to see my teaser goto http://www.sexstoriesexchange.com/stories/straight Adult content is hidden to unregistered users but I made it so that only the teasers are shown so don't worry about seeing anything you don't want to see.
----
http://www.Trulyunusual.com and http://www.top100giftideas.com
I just upgraded to Drupal
I just upgraded to Drupal 5.X and had to reapply this code. Still works like a charm. :)
trim at end of word
see here, apply wherever you need to do it: http://drupal.org/node/112491#comment-200716
-------------------------------------------
Interactive Worlds and Immersive Obsessions
http://www.asifproductions.com
thanks... it works
thanks... it works