{SHOW_CONTENT} Show content of a particular content part
argh
This rep tag hasn't been working for me and I'm not sure why. I've created the file exactly as specified and put it in frontend_render. Then I added {SHOW_CONTENT:5} to a table on my template, but when I try to see it on the page the space shows up blank.
I know I'm using the right article id because I made the content part the only one with a "top" button and that shows up just fine, just not the actual article. It's as if the code suddenly stops when it's trying to output the article...
Code in template:
Code that appears in the page:
So what's going on?
I know I'm using the right article id because I made the content part the only one with a "top" button and that shows up just fine, just not the actual article. It's as if the code suddenly stops when it's trying to output the article...
Code in template:
Code: Select all
<td class="appendix">
{SHOW_CONTENT:5}
<br />
{SPACER:225x1}
</td>
Code: Select all
<td class="appendix">
<div style="margin:3px 0 0 0; padding:0 0 0 0; clear:both;"></div><div align="right"><a href="#top"><img src="img/article/top_link_0.gif" border="0" alt="" /></a></div><div style="margin:0 0 3px 0; padding:0 0 0 0; clear:both;"></div>
<br />
<img src="img/leer.gif" border="0" width="225" height="1" alt="" />
</td>
Hi reveri,
this RT works contentpart-sensitive. You simply must use the Contentpart-ID.
Gruß Knut
this RT works contentpart-sensitive. You simply must use the Contentpart-ID.
Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Hello,
while using this lovely rt I came across the following: if there is a link in the rendered cp (like [ ID 55 ]linkname[ /ID ] the link will get stripped off and I see the "[ ID 55 ]linkname[ /ID ]" as normal text (the link in the cp itself is rendered as supposed). Has anybody encountered this before or am I doing something wrong?
What can be done?
Thanks in advance
Greetings
Claus
while using this lovely rt I came across the following: if there is a link in the rendered cp (like [ ID 55 ]linkname[ /ID ] the link will get stripped off and I see the "[ ID 55 ]linkname[ /ID ]" as normal text (the link in the cp itself is rendered as supposed). Has anybody encountered this before or am I doing something wrong?
What can be done?
Thanks in advance
Greetings
Claus
Re: {SHOW_CONTENT} Show content of a particular content part
JensZ wrote://----------------------------------------------------------------------------------------------
// {SHOW_CONTENT}
// AUTHOR: Jens Zetterström
// DESCRIPTION: Shows the content of the article content part with the specified id.
// INSTALLATION: Put the code in frontend_render (for example in a file called show_content.php)
// Note: If the article content part contains replacement tags (for example {SITE}),
// they will not be replaced because code in frontend_render is executed after those
// replacement tags already have been processed. To fix, put the code in
// content.article.inc.php instead.
// USAGE: {SHOW_CONTENT:acontent_id}
// where acontent_id is the id of the content part.
//----------------------------------------------------------------------------------------------
Cheers,
Jens



edit:
thanks a lot! And when I use links like 19.56.0.0.1.0.phtml everything is ok (I wonder if this kind of link would be appropriately adapted if I move an article into another level?)
I'd just try to avoid too many changes in the scripts code because the next update is knocking at the door rightonTo fix, put the code in
// content.article.inc.php instead.

Greetings
claus
-
- Posts: 40
- Joined: Wed 2. Nov 2005, 21:41
-
- Posts: 40
- Joined: Wed 2. Nov 2005, 21:41
Hallo!pepe wrote:Du denkst daran, daß es diesesmal tatsächlich die Ident-Nummer des Artikels ist... und nicht die CAT Id. (Kategorie)
Mein Stand:
PHPWCMS DEV. 1.2.6
-Artikel ID ist 23.
-In dieser Kat. ist nur dieser einzige Artikel (ID 23)
-Content Part ID des Artikels 23 ist 2
-Content Part ist auf Ausgabe {LEFT} (Wo auch mein Menu ist) eingestellt
-Im template layout (links) ist folgender Tag eingetragen {SHOW_CONTENT:23}
Die Ausgabein der HP ist immer noch der Tag selber!
...es funzt nicht... schade....

Danke für die schnelle Antwort
-
- Posts: 40
- Joined: Wed 2. Nov 2005, 21:41
pepe wrote:.
.
. . . aber du hast schon in der conf.inc.php den Schalter gesetzt![]()
$phpwcms["allow_ext_render"] = 1; //allow including of custom external scripts at frontend rendering
Ja! Alles ok... es war schon auf 1...
Trotzdem funzt es nicht...
ich habe den Code von {SHOW_CONTENT} im frontend rendering als show_content.php eingefügt und ich habe es auch versucht im content.article.inc.php einzufügen. Ich habe in der if(!(.....) letzten Zeilen (File: show_content.php) ein print "ich bin drin"; eingefügt um zu sehen ob er bis dort hin kommt. Nada, nichts... er kommt nicht dort hin.
Ich habe versucht ein Artikel mit Content Part (Ausgabe {left}) im template left auszugeben. Im template left habe ich schon {LEFT} eingetragen aber auch nichts. Bei mir funz irgenwie nur der tag {CONTENT} und die Tags {LEFT} {RIGHT} {HEADER} {FOOTER} nicht. Der Rest von PHPWCMS funzt einwandfrei...

Das Calendar Modul funktioniert perfekt. Dort wird auch der Kalender im template LEFT (Unterm NAV_Table) angezeigt. Ohne Probleme.