Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Tutorial question


Go to End


2 Posts   1100 Views

Avatar
cmstester

Community Member, 15 Posts

20 June 2008 at 3:12am

I've review the 2nd tutorial here on the SS.com site and implemented the showing of news on the front page. I have one problem, however. It implements the news as an unordered list like so:

<div id="Content" class="typography">		
	$Content
	<ul id="NewsList">
		<% control Children %>
			<li class="newsDateTitle"><a href="$Link" title="Read more on &quot;{$Title}&quot;">$Title</a></li>
			<li class="newsDateTitle">$Date.Nice</li>
			<li class="newsSummary">$Content.FirstParagraph <a href="$Link" title="Read more on &quot;{$Title}&quot;">Read more &gt;&gt;</a></li>
		<% end_control %>
	</ul>
</div>

The issue with this is it bulled the title, the date and the article summary. This looks awful. I want it to look more like a blog post like the blog module. I can't use the blog module though because i'm using it for something else. How can i change this or what can I change it to to make it not show the bullets without editing the css to remove bullets from an UL?

Avatar
Willr

Forum Moderator, 5523 Posts

20 June 2008 at 1:59pm

Just change the ul to a paragraph or something?

<div id="Content" class="typography">
  $Content
     <% control Children %>
	<div class="newsArticle">
        	<h3><a href="$Link" title="Read more on &quot;{$Title}&quot;">$Title</h3>
        	<p>$Date.Nice</p>
     		<p>$Content.FirstParagraph <a href="$Link" title="Read more on &quot;{$Title}&quot;">Read more &gt;&gt;</a><p>
	</div>
     <% end_control %>
  </ul>
</div>