Page 1 of 1

News Template - Not sure how to format

Posted: Tue Nov 17, 2009 5:14 pm
by Snowneo
Hello, Currently I am moving my site over from HTML into the CMS MS, I have gotten most of the site complete, and this is the last piece of work that needs to go in, I am having some trouble figuring out the codes to work. Although I have tried placing in things such as {entry->content} I always end up with errors of some sort with Smartys. If someone could help me out with this it would be greatly appreciated.

Code: Select all

<br>
<table width="565" align="center" border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td class="newsavatar" rowspan="2" align="center" valign="top">

 <img src="http://images.neopets.com/neoboards/avatars/valiant.gif" alt="x">
<br>

<b><font color="#eeeeee">Author Name</font></b>
<p style="padding-top: 20px;">


<em><font color="#cc6600" size="1">Date/Time</font></em></p>
</td>


<td class="newstitle" height="22">News Title</td>
</tr>
<tr><td class="news" valign="top">

<div align="center">
All Content

</div>

</td></tr>
<tr><td colspan="2" class="comments"><b>Comments</b> - <i>Coming Soon</i> </td></tr>
</table>

Re: News Template - Not sure how to format

Posted: Tue Nov 17, 2009 5:29 pm
by jmcgin51
have you looked at the default News templates?

Re: News Template - Not sure how to format

Posted: Tue Nov 17, 2009 6:48 pm
by Snowneo
Yes, that is what I was referencing to as well as the documentation
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Content/News/Templates

But cannot seem to grasp it. I was able to do the sites template but that was more straight forward with the variables.

Re: News Template - Not sure how to format

Posted: Tue Nov 17, 2009 8:40 pm
by Peciura
Post template you are modifying and a link to result similar you are trying to achieve.

IMO you should use divs instead of tabla layout. It requires more job at the beginning thought is more flexible.

Inspect news template  variables with tags {get_template_vars}, {dump item=$entry}, {$entry|debug_display}.

Re: News Template - Not sure how to format

Posted: Thu Nov 19, 2009 3:14 pm
by Dr.CSS
There are a whole set of default templates you can look to in the News admin they have all the variables you need, look for how they are used and what div they are in like the author one has the tag in it just copy that tag to yours, you also need the 'for each from' etc. stuff...