Page 1 of 1

remove article title from {CONTENT}

Posted: Sat 27. Aug 2005, 21:00
by submike
How do I remove the article title from appearing within the {CONTENT} replacement tag for Release 1.1-RC4 22-06-2004?

Specifially, I would like to remove the following code from the beginning of the {CONTENT} tag:

Code: Select all

<span class="articleHead">Article Title/span><img src="img/leer.gif" alt="" height="8" width="1"><br></p>
Thanks in advance,
Mike

Posted: Sun 28. Aug 2005, 10:21
by pico
Hi

make your own template - see sample.tmpl - and select this in Article.

Posted: Mon 29. Aug 2005, 18:08
by submike
Here's my template code utilizing the {CONTENT} replacement tag:

Code: Select all

<p class="content"><!-- startprint -->{CONTENT}<!-- stopprint --></p>
This is what appears:

Code: Select all

<p class="content"><!-- startprint --><span class="articleHead">Article Title/span><img src="img/leer.gif" alt="" height="8" width="1"><br />This is where the content would appear.<!-- stopprint --></p>
I would like to remove the following portion from displaying at the beginning of the {CONTENT} replacement tag:

Code: Select all

<span class="articleHead">Article Title/span><img src="img/leer.gif" alt="" height="8" width="1"><br />
I just found out how to suppress the Article Title from the content, by commenting out the Article Title on line 133 of the content.article.inc.php file. However, I'm still stuck with that mystery <br /> tag. Oliver (or anyone else) know where I can comment out this <br /> tag?

Here's some images to clarify what I'm trying to fix.

Right
Image

Wrong - notice the extra space caused by the break tag (highlighted in red)
Image

Any help would be greatly appreciated,
Mike

P.S. Again great CMS, can't wait to work with the latest release

Posted: Mon 29. Aug 2005, 18:19
by submike
FOUND IT
Remove the <br /> from the following line of code in the cnt6.article.inc.php (HTML content type):

Code: Select all

$content["main"] .= ($crow["acontent_html"]) ? "<br />".$crow["acontent_html"] : "";

Posted: Mon 29. Aug 2005, 19:47
by StudioZ
submike wrote:FOUND IT
Remove the from the following line of code in the cnt6.article.inc.php (HTML content type):

Code: Select all

$content["main"] .= ($crow["acontent_html"]) ? "<br />".$crow["acontent_html"] : "";
hmmm.... submike,
I would beleive that your most "viable" solution would be to play around with the css instead. Have you tried to hammer down the space before, with:

Code: Select all

margin-top: 0px;
margin-bottom: 0px;
Not sure if this is what you need but... with these sites I have to deal with, I very rarely and/or less often go edit under the hood :wink:
He He... As you noticed already...
This CMS has nothing to do with Mambo PhpWebSite nor *Nuke :lol:
This is PhpWCMS !
:D :D :D
Built on solid ground 8)

Cheers,

Posted: Mon 29. Aug 2005, 20:07
by submike
Thanks StudioZ for the tip, but it would not work in this scenario. I'm developing a site that's a little bit different from the normal PHPWCMS template, which BTW works great.

I needed to seperate the Article Title from the {CONTENT} replacement tag which seems to be setup something like this:

{CONTENT}
Article Title
<br>
Content
{/CONTENT}

I altered the code, so the displays replacement tag appears this way:

{CONTENT}
Content
{/CONTENT}

I'll post the site for all to check it out sometime later this week.

I, too, don't like to go under the hood, but sometimes it's necessary. Plus, I'm under a very tight deadline, so I've got to do some hacking to get this site done and out the door.

Thanks for all the replies on my posts,
Mike

Posted: Tue 30. Aug 2005, 12:45
by pico
Hi

what I ment was the sample.tmpl in ../phpwcms_template/inc_cntpart/articlesummary/sample.tmpl

Code: Select all

<div>
[TITLE]<h1 style="margin:0 0 5px 0;">{TITLE}</h1>[/TITLE]
[SUB]<h3 style="margin:0 0 5px 0;">{SUB}</h3>[/SUB]
<p style="margin:0">[IMAGE]<span style="float:left;margin:2px 5px 8px 0;">{IMAGE}[CAPTION]<br>{SPACER:1x3}<br>{CAPTION}[/CAPTION]</span> [/IMAGE]
<strong>{DATE:Y-m-d:EN}</strong> {SUMMARY}</p>
</div>
and don't forget to select this un the Article ;)