Read more not visible unless you expand the collapsible field in the teaser view (i.e., user probably won't see it). See attachment.

CommentFileSizeAuthor
collapsible-read-me.png335.89 KBrkodrupal

Comments

rkodrupal’s picture

don't know if the following is helpful, but http://drupal.org/node/221257#comment-3735536 has done an exceptional job at creating clean teasers ... even with my convoluted html ... I'm not a programmer but this seems as though it might be relevant in trying to figure out where to place the 'read me' tag ... if not, at least you now have further information on what may be causing my issues in my case.

todd nienkerk’s picture

The collapsible teaser isn't standard Drupal output, so I'm not sure the Read More module can support it.

Is a contributed module generating the collapsible teaser, or is this something custom to your site (a custom module, your theme, etc.)?

rkodrupal’s picture

Todd, it's a javascript I grabbed from off the internet, not standard (or contributed) Drupal at all.

I encourage you to go through the earlier thread I referenced (http://drupal.org/node/221257#comment-3735536) ... user AlexisWilke has done an amazing job at fixing (hacking) the standard Drupal handling of teasers (which as you probably know can be a programmer's nightmare). Once the teaser is closed out properly then Read More should work well for all cases.

As it stands now the Read More module violates the conclusion of http://drupal.org/node/164343 ... it is inserting the Read More link before closing out all the div's.

todd nienkerk’s picture

Todd, it's a javascript I grabbed from off the internet, not standard (or contributed) Drupal at all.

It appears this script cuts the teaser at a certain point and adds an ellipsis image that expands the teaser to full length (but not a full node). There's nothing Read More can do here, as it's only supposed to add itself at the end of the teaser -- not at some arbitrary point chosen by JavaScript applied to the page during rendering.

As it stands now the Read More module violates the conclusion of http://drupal.org/node/164343 ... it is inserting the Read More link before closing out all the div's.

The conclusion of that thread was to automatically configure the Read More link to be inserted inside only <p> tags when in "inline" mode, which is what it currently does. It deliberately does not close out all <div> tags when in "inline" mode because it could not be displayed inline.

The module can be configured to display the link after all tags in the teaser have been closed.

todd nienkerk’s picture

I think the problem lies in the JavaScript you're using. It appears to be taking the entire teaser, splitting it into two <div> elements, and hiding the second <div>. Unless the JS knows to exclude the Read More link, the link simply gets lumped in with the second half of the teaser.

Because this is happening in the browser (i.e., JS is modifying markup client-side after Drupal renders it), there's nothing the Read More link module can do. The JS needs to be modified to exclude the Read More link from being included in the second, hidden <div> element.

rkodrupal’s picture

The splits (i.e., the div's) are manual (in the HTML). The JS is really quite rudimentary ... it merely looks for the div id's. I suspected this might be difficult. Thanks for taking the time to consider it though.

Happy drupaling...

collapsible.js
function toggle5(showHideDiv, switchImgTag) {
var ele = document.getElementById(showHideDiv);
var imageEle = document.getElementById(switchImgTag);
if(ele.style.display == "block") {
ele.style.display = "none";
imageEle.innerHTML = '...';
}
else {
ele.style.display = "block";
imageEle.innerHTML = '...';
}
}

todd nienkerk’s picture

Status: Active » Closed (won't fix)

Marking this "won't fix," as the problem appears to be a result of custom JavaScript added by a theme.