No teaser text is appearing.
Permalink Browser Info Environment
Installed the block, and selected the "Teasers" custom template, I have truncate descriptions checked, but no teaser text is appearing. The page in question contains only text content.
Type: | Discussion |
---|---|
Status: | New |
Ok, it was not in an area called "Main". Once I used "Main" it works.
How can I have more than one of these on a page if it only works with "Main"?
I put:
in the config/site.php and created a "Teaser" area but it didn't work?
Thanks!!
How can I have more than one of these on a page if it only works with "Main"?
I put:
define('PAGE_LIST_TEASERS_AREA', 'Teaser');
in the config/site.php and created a "Teaser" area but it didn't work?
Thanks!!
You need to do either one or the other -- either put the content in the "Main" area, OR add the line of code to config/site.php. If you don't want to have to put your content in the "Main" area, then you need to put in the line of code and change "Teaser" to the name of the area that you DO want the content in.
This addon is only designed to pull teasers from one area on a page -- if for some reason you have two different Page Lists and you want each one to show different excerpts of content, then unfortunately this won't work for you.
-Jordan
This addon is only designed to pull teasers from one area on a page -- if for some reason you have two different Page Lists and you want each one to show different excerpts of content, then unfortunately this won't work for you.
-Jordan
Ah, got it. I can deal with that. It's all working now, at least. Thanks!
In the latest build, adding the define() in site.php as above does not work because "Main" is hard coded in this file:
on line 17. Changing it there fixes the problem.
packages/page_list_teasers/blocks/page_list/templates/teasers.php
on line 17. Changing it there fixes the problem.
You are correct that the latest version of the addon does not have the PAGE_LIST_TEASERS_AREA definition anymore, and the new way is more consistent with how Concrete5 custom templates work (and easier to change in my opinion).
Here are specific instructions...
Edit the packages/page_list_teasers/blocks/page_list/templates/teasers.php, find this line of code:
...and change it to this:
Then clear your site cache via the dashboard.
-Jordan
Here are specific instructions...
Edit the packages/page_list_teasers/blocks/page_list/templates/teasers.php, find this line of code:
$teaser = $plth->getPageTeaser($page, 'Main', $teaserBlockCount, $teaserTruncateChars);
...and change it to this:
$teaser = $plth->getPageTeaser($page, 'Some Other Area', $teaserBlockCount, $teaserTruncateChars);
Then clear your site cache via the dashboard.
-Jordan
Does it work if you don't check "Truncate descriptions"?
Is the text content in an area called "Main"? By default it always looks in that area (you can change this though -- add the following line to your "site.php" file in your site's "config" folder:
Are there other blocks before the text content? What kind of blocks are they (e.g. "Content", "HTML", etc.)?