Hi,
I have an article that contains nothing but a contentpart (external content). I now want to show the contentpart in the article listing instead of the article summary. How can I do this? Is it possible?
Best
contentpart in listing
- Oliver Georgi
- Site Admin
- Posts: 9918
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: contentpart in listing
Nothing is impossible - but this is not how it is working - so no chance by default.
Oliver
Oliver
Re: contentpart in listing
For another CP than "external content" I just did it this way, some days ago:
Open/edit your template for "article listing" in:
[x]
where ID is the ID of your CP "external content", e.g. 142
Example of the "normal" template for article listing::
[x]
The final example with this RT applied to the first article in the site structure level, what can be found here:
[x]
Or did I misunderstand your question?
Open/edit your template for "article listing" in:
[x]
where ID is the ID of your CP "external content", e.g. 142
Example of the "normal" template for article listing::
[x]
The final example with this RT applied to the first article in the site structure level, what can be found here:
[x]
Or did I misunderstand your question?
Last edited by Jensensen on Fri 19. Sep 2008, 20:27, edited 2 times in total.
-
- Posts: 14
- Joined: Wed 2. Apr 2008, 16:03
Re: contentpart in listing
Thx.
You understood it right.
Actually I did it like you said, but I didn't change the template, I wrote a new script and put it into frontend_render, so that I can use the SHOW_CONTENT tag in the article summary.
Here's the script I used (thanks to Oliver):
You understood it right.
Actually I did it like you said, but I didn't change the template, I wrote a new script and put it into frontend_render, so that I can use the SHOW_CONTENT tag in the article summary.
Here's the script I used (thanks to Oliver):
Code: Select all
<?php
$content["all"] = preg_replace('/\{SHOW_CONTENT:(.*?)\}/e', 'showSelectedContent("$1");', $content["all"]);
?>
Re: contentpart in listing
this function "showSelectedContent" seems to be newly integrated to the php code of the cms with >v1.3.9 (dev r_xyz).
will not work with earlier versions. am i right?
BTW: what's the difference/advantage of "showSelectedContent" function + FE render script vs. "good old" SHOW_CONTENT RT in brief?
will not work with earlier versions. am i right?
BTW: what's the difference/advantage of "showSelectedContent" function + FE render script vs. "good old" SHOW_CONTENT RT in brief?
- Oliver Georgi
- Site Admin
- Posts: 9918
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: contentpart in listing
The function is not new - it's in there since SHOW_CONTENT is available. And it is exactly the same peace of code for rendering {SHOW_CONTENT...} - just placed in frontend_render to handle tags accessible only when article is rendered. By default SHOW_CONTENT is rendered very early.Jensensen wrote:this function "showSelectedContent" seems to be newly integrated to the php code of the cms with >v1.3.9 (dev r_xyz).
will not work with earlier versions. am i right?
BTW: what's the difference/advantage of "showSelectedContent" function + FE render script vs. "good old" SHOW_CONTENT RT in brief?
Oliver
Re: contentpart in listing
@Jensensen: You can see another example for using the function showSelectedContent in this RT {SHOW_ARTICLE_CP} (at the bottom of the RT).
Have a look into the file include/inc_front/content.func.inc.php. there you can see the chronological order of the render process.
Have a look into the file include/inc_front/content.func.inc.php. there you can see the chronological order of the render process.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )