Page 1 of 1

Help with News

Posted: Sat 4. Jul 2009, 15:03
by Techno_maynaQ
How can i make a list of news and put them on index page? i find a site doing this but cant configure it out.

Image

news will listed here and link to news page. i looked everywhere in backend but cant find any setting or anything like this.
no special shape or class needed. i just wanna list news on my homepage.

can anyone help me with this? i didnt create any news. except news everything is done.

Re: Help with News

Posted: Sat 4. Jul 2009, 17:06
by Oliver Georgi
Use the content part news for this.

Oliver

Re: Help with News

Posted: Sat 4. Jul 2009, 17:59
by Techno_maynaQ
the problem is i dont know how to do this with news part. can you explain how to do?

Re: Help with News

Posted: Sat 4. Jul 2009, 18:53
by Oliver Georgi
1) Create news
2) Open the article where you want to have the news block or use a "service" article that just holds the News content part
3) Create new content part "news"
4) Select template (you can also create a new one)
5) Keep in mind you can use tags and some special filters there too to limit choosen news
6) Think about a target article holding news content part in case you use systemwide* news block
6) Save

*) Remember - you can use content parts in your template systemwide. So check the ID of the news content part and use {SHOW_CONTENT:CP,ID} in your template.
2009-07-04_180741.png
2009-07-04_180814.png

Re: Help with News

Posted: Sun 5. Jul 2009, 01:20
by pepe
Here is a nice Video .... HOW TO!

http://forum.phpwcms.org/viewtopic.php?f=10&t=17361

Re: Help with News

Posted: Sun 5. Jul 2009, 17:47
by Techno_maynaQ
i think you dont get it. my problem is NOT adding news or creating news page. i add news page. add news. and i want news to be shown as a list (like in picture in my first post). just news titles and when user clicks title it will link to news details. can you tell me this? not to add news. please.

P.S. Thanks for answers.

Re: Help with News

Posted: Sun 5. Jul 2009, 19:10
by flip-flop
In addition: News

Why you don“t write your own news template to do so? Second use the {SHOW_CONTENT...} tag for position the output in your site template.
It is very easy.

Knut

Re: Help with News

Posted: Mon 6. Jul 2009, 08:30
by Oliver Georgi
See this template example (I have not tested it). Put it in template/inc_cntpart/news.
news_simple_listing.zip
(1.08 KiB) Downloaded 209 times

Code: Select all

<!--NEWS_SETTINGS_START//-->
; how many news should be listed per row
news_per_row = 2

; teaser text rendered as <p></p> = p
; or just line break to <br> = br
news_teaser_text = p

; template for files - the same as used
; for content part files , default:
; files_template_list = default
files_template_list = default
files_template_detail = default
files_direct_download = 0
<!--NEWS_SETTINGS_END//-->


<!--NEWS_LIST_START//-->
[TITLE]<h3>{TITLE}</h3>[/TITLE]
[SUBTITLE]<h4>{SUBTITLE}</h4>[/SUBTITLE]
[NEWS_ENTRIES]<ul>
{NEWS_ENTRIES}
</ul>[/NEWS_ENTRIES]
<!--NEWS_LIST_END//-->

<!--NEWS_LIST_ENTRY_START//-->
	<li class="newsEntry[PRIO] prio{PRIO}[/PRIO][FIRST] firstEntry[/FIRST]">
	[NEWS_TITLE]
		[NEWS_DETAIL_LINK]<a href="{NEWS_DETAIL_LINK}">[/NEWS_DETAIL_LINK]
		{NEWS_TITLE}
		[NEWS_DETAIL_LINK]</a>[/NEWS_DETAIL_LINK]
	[/NEWS_TITLE]
	</li>
<!--NEWS_LIST_ENTRY_END//-->

<!--NEWS_LIST_ENTRY_SPACE_START//--><!--NEWS_LIST_ENTRY_SPACE_END//-->

<!--NEWS_LIST_ROW_SPACE_START//--><!--NEWS_LIST_ROW_SPACE_END//-->

<!--NEWS_DETAIL_START//-->
<div class="news">
	<div class="news-header">
		[TITLE]<h3>{TITLE}</h3>[/TITLE]
		[SUBTITLE]<h4>{SUBTITLE}</h4>[/SUBTITLE]
	</div>
	<!-- 
		Changedate: {DATE:m/d/Y H:i:s lang=EN}
		Livedate:   {LIVEDATE:d.m.Y H:i:s lang=EN}
		Killdate:   {KILLDATE:d.m.Y H:i:s lang=EN}
		Sortdate:   {SORTDATE:d.m.Y H:i:s lang=EN}
	//-->
	[NEWS_TITLE]<h1>{NEWS_TITLE}</h1>[/NEWS_TITLE]
	[NEWS_SUBTITLE]<h2>{NEWS_SUBTITLE}</h2>[/NEWS_SUBTITLE]
	[NEWS_TOPIC]<p>
		<strong>{NEWS_TOPIC}</strong>[AUTHOR], {AUTHOR}[PLACE], {PLACE}[/PLACE][/AUTHOR][AUTHOR_ELSE][PLACE], {PLACE}[/PLACE][/AUTHOR_ELSE]
	</p>[/NEWS_TOPIC]
	[IMAGE]
		[ZOOM_ELSE]
			[IMAGE_URL]<a href="{IMAGE_URL}"{IMAGE_URL_TARGET}>[/IMAGE_URL]
				<img src="img/cmsimage.php/150x150x1/{IMAGE_ID}" alt="{IMAGE}" border="0" />
			[IMAGE_URL]</a>[/IMAGE_URL]
			[CAPTION]<p>{CAPTION}</p>[/CAPTION]
		[/ZOOM_ELSE]
		[ZOOM]
			<a href="img/cmsimage.php/600x400/{IMAGE_ID}" target="_blank"{LIGHTBOX}[LIGHTBOX_CAPTION] title="{LIGHTBOX_CAPTION}"[/LIGHTBOX_CAPTION]>
				<img src="img/cmsimage.php/100x100x1/{IMAGE_ID}" alt="{IMAGE}" border="0" />
			</a>
		[/ZOOM]		
	[/IMAGE]
	[NEWS_TEXT]{NEWS_TEXT}[/NEWS_TEXT]
	[NEWS_TEXT_ELSE][NEWS_TEASER]{NEWS_TEASER}[/NEWS_TEASER][/NEWS_TEXT_ELSE]
	[URL]
		<p><a href="{URL}"{URL_TARGET}>[URL_TEXT]{URL_TEXT}[/URL_TEXT][URL_TEXT_ELSE]more[/URL_TEXT_ELSE]</a></p>
	[/URL]
	[FILES]{FILES}[/FILES]
	
	[NEWS_LIST_LINK]
		<p class="link"><a href="{NEWS_LIST_LINK}">back</a></p>
	[/NEWS_LIST_LINK]
	
</div>
<!--NEWS_DETAIL_END//-->
Oliver

Re: Help with News

Posted: Mon 6. Jul 2009, 15:13
by Techno_maynaQ
i really feel so stupid. i dont get it anyway. any tutorial for dummies?

Re: Help with News

Posted: Tue 4. Aug 2009, 15:13
by Techno_maynaQ
is there anyone can help me online via msn or something like that?