Page 1 of 1

RT for content title of teaser/link article?

Posted: Thu 21. Jun 2007, 22:04
by funcman
Hello,

I want to style the content title (h3's) of a teaser/link article. Are there any replacement tags to get the content title of a teaser/link article?

I am using a custom template for my teaser/link article.

Thanks!

Posted: Thu 21. Jun 2007, 22:57
by pepe
it's possible, without any special RT.. :idea:

let's say you have something like the following as your template-code:
<!--TEASER_ENTRY_START//-->
<div>
<h3><a href="{ARTICLELINK}">{TITLE} &raquo;</a></h3>
[IMAGE]<div style="float:left; margin:2px 5px 2px 0">{IMAGE}[CAPTION]<p>{CAPTION}</p>[/CAPTION]</div>[/IMAGE]
<p>{DATE:d/m/y:EN}[SUBTITLE] <b>{SUBTITLE}.</b>[/SUBTITLE]
{SUMMARY} <a href="{ARTICLELINK}">&raquo;</a></p>
</div>
<!--TEASER_ENTRY_END//-->
now you can add an own class to the starting div, and so you are able, to make a special formating inside the frontemd.css !!
<!--TEASER_ENTRY_START//-->
<div class"special_teaser_class">
<h3><a href="{ARTICLELINK}">{TITLE} &raquo;</a></h3>
[IMAGE]<div style="float:left; margin:2px 5px 2px 0">{IMAGE}[CAPTION]<p>{CAPTION}</p>[/CAPTION]</div>[/IMAGE]
<p>{DATE:d/m/y:EN}[SUBTITLE] <b>{SUBTITLE}.</b>[/SUBTITLE]
{SUMMARY} <a href="{ARTICLELINK}">&raquo;</a></p>
</div>
<!--TEASER_ENTRY_END//-->
and inside your frontend.css:
.special_teaser_class h3 {
.
.
.
}
So it's possible to have another formatting for all h3 classes, inside .special_teaser_class :wink:


Another way... put your "special" styles into the code:
<!--TEASER_ENTRY_START//-->
<div>
<h3 style="font-size:10px; color:#CC0000;"><a href="{ARTICLELINK}">{TITLE} &raquo;</a></h3>
[IMAGE]<div style="float:left; margin:2px 5px 2px 0">{IMAGE}[CAPTION]<p>{CAPTION}</p>[/CAPTION]</div>[/IMAGE]
<p>{DATE:d/m/y:EN}[SUBTITLE] <b>{SUBTITLE}.</b>[/SUBTITLE]
{SUMMARY} <a href="{ARTICLELINK}">&raquo;</a></p>
</div>
<!--TEASER_ENTRY_END//-->

Posted: Fri 22. Jun 2007, 00:28
by funcman
Thanks for your reply pepe, however I think you misunderstood me, I am talking about the content title not the title of the individual articles.

In the following case it would be "2007 Releases"

Image

My template code:

Code: Select all


<ul class="linksmenu">
    <li>
        <a href="#" onclick="window.open('{ARTICLELINK}','presswindow','height=400,width=486,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no'); return false;">{TITLE}</a>
    </li>
</ul>
there is no mention of content title, yet in the output it renders it.

Image

and the source

Code: Select all

<h3>2007 Releases</h3>

<ul class="linksmenu">

				<li><a href="#" onclick="window.open('index.php?aid=16','presswindow','height=400,width=486,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no'); return false;">BTV+ names David Spence as National Account Executive</a></li>
	



				<li><a href="#" onclick="window.open('index.php?aid=17','presswindow','height=400,width=486,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no'); return false;">General Motors Awards BTV+ 5-Year Contract for Studio Upgrade, Build and Operations</a></li>
	

</ul>

<h3>2005 Releases</h3>

<ul class="linksmenu">

				<li><a href="#" onclick="window.open('index.php?aid=18','presswindow','height=400,width=486,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no'); return false;">Test asdfasdfa</a></li>
	

</ul>
Is there another template that a teaser/link article component uses?

Posted: Fri 22. Jun 2007, 03:33
by Jensensen
Hi funcman,

it's still nearly the same, as pepe mentioned.
But one level higher in CSS hierarchy.

For example, if you have a page layout with, let's say three columns
#col1, #col2 and col#3.

If you place the CP 'Teaser/Articlelink' in column 3, you will have to add to your CSS file:

#col3 h3 {style;}


Otherwise, this is some of the phpwcms limitations, that you can't tag certain classes to headers.


On the other hand phpwcms offers one more alternative:

A) leave content title (--> h3) of the CP Teaser --> BLANK and
B) place content part HTML before/above which contains just:

<h3 class"MySpecialTeaserClass">2007 Releases</h3>



Greetz
Jensensen