News Template - Not sure how to format

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Snowneo
New Member
New Member
Posts: 3
Joined: Fri Apr 25, 2008 11:30 pm

News Template - Not sure how to format

Post 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>
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: News Template - Not sure how to format

Post by jmcgin51 »

have you looked at the default News templates?
Snowneo
New Member
New Member
Posts: 3
Joined: Fri Apr 25, 2008 11:30 pm

Re: News Template - Not sure how to format

Post 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.
Peciura

Re: News Template - Not sure how to format

Post 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}.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News Template - Not sure how to format

Post 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...
Post Reply

Return to “Layout and Design (CSS & HTML)”