remove article title from {CONTENT}

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
submike
Posts: 50
Joined: Wed 25. Aug 2004, 17:36
Location: Chicago
Contact:

remove article title from {CONTENT}

Post 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
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

make your own template - see sample.tmpl - and select this in Article.
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
submike
Posts: 50
Joined: Wed 25. Aug 2004, 17:36
Location: Chicago
Contact:

Post 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
submike
Posts: 50
Joined: Wed 25. Aug 2004, 17:36
Location: Chicago
Contact:

Post 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"] : "";
Last edited by submike on Mon 29. Aug 2005, 19:56, edited 1 time in total.
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post 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,
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
submike
Posts: 50
Joined: Wed 25. Aug 2004, 17:36
Location: Chicago
Contact:

Post 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
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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 ;)
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
Post Reply