I have created a node using some of these snippets, which generate long lists of nodes' teasers. When in front page, I need only the first paragraph - html-only - to show. So I tried to insert a <!--break--> at the beginning of the node's body, which input format is PHP code. But it didn't work: the PHP node shows its full version, i.e., a list of other teasers, and the result is rather confusing... What should I do??

Comments

gnat’s picture

i'm pretty sure that for fear of causing parse errors,

is ignored in php nodes.

take a look at the teaser module, that might be able to help you out since it allows you to define teasers apart from the content of the node.

dtabach’s picture

I thought <!--break--> would work with PHP filter, because other html tags do. Thanks for the information.
At least we have a workaround. I'll check the teaser module (cvs), as well as the excerpt module (4.6.0), which may also do the trick.

Durval Tabach

samdeskin’s picture

I have been looking for 2 days to figure out how to get rid of the teaser section.

This section of administer > settings > posts is misleading:

The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers.

Unlimted does not work properly. It does not disable teasers - not in all cases - like PHP.

The Length of trimmed posts can be best modified by using the excerpt module identified above.

If someone could now help me figure out how to get rid of "read more" and the extra spaces without getting rid of print preview... that would be very helpful!

Thanks for your help.

sam

dvessel’s picture

Last time I checked

worked fine with php as the input filter. I would check the markup of whatever you typed in before that break.

joon

Slusaj’s picture

Well...I have searched forum for "

" and haven`t found what I need so I`ve decided to ask here...

<!--break--> works only with few of node types...

I have investigated it further and haven`t found any diferences between node types that work with BREAK and ones that don`t work...

Somebody has some geniues idea for resolving this issue ?? :)

thanx in advance

samdeskin’s picture

hi,

I used the excerpt module and it made it very easy - I was having trouble getting the

to work properly in the php input format. With the excerpt module, you bypass the existing teaser info and have direct access the the teaser. It worked in 4.7.4 for me. You can see my website:

http://finduslaw.com

The teasers within the By Legal Topic and By Region are customized / blank at my option through the excerpt module.

Good Luck!

sam

GKamsika’s picture

nm fixed.