{{indexmenu_n>100}} ===== News ===== [[http://forum.phpwcms.org/viewtopic.php?p=104366#p104366]] (Ben) [[http://forum.phpwcms.org/viewtopic.php?p=104391#p104391]] (Markus) [[http://forum.phpwcms.org/viewtopic.php?p=117841#p117841]] (Oliver) ===== Short descrition ===== Forum: [[http://forum.phpwcms.org/viewtopic.php?p=117841#p117841]] Autor: Oliver Georgi (2009/07/04) **Create news** - Open the article where you want to have the news block or use a "service" article that just holds the News content part - Create new content part "news" - Select template (you can also create a new one) - Keep in mind you can use tags and some special filters there too to limit choosen news - Think about a target article holding news content part in case you use systemwide* news block - 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. {{:english:phpwcms-system:article:contentparts:news_2009-07-04_180741.png|}} {{:english:phpwcms-system:article:contentparts:news_2009-07-04_180814.png|}} \\ ==== News und Teaser TAG ==== Forum: [[http://forum.phpwcms.org/viewtopic.php?p=111617#p111617]] Autor: markus_s .{{:deutsch:phpwcms-system:artikel:contentparts:news_inhalt.jpg?250x300 }} * Create at **ARTICLES -> NEWS** (left in menu) some entries. * The most important thing is to enter a name in the range TAG/KEY WORD - e.g. the year **2008** * Then you enter a CP e.g. on the starting side news and fill it out .. -> here enter again the TAG/KEY WORD **2008** ... * If you have insert in entries "max. 2", only the first two entries are shown in fe. * Using the template option ##template/inc_cntpart/news/* ## you can change your layout. (Please copy the master template from ##template/inc_default/news.tmpl## to ##template/inc_cntpart/news/my_news.tmpl##) * If you enter a name in ##news article:##, it should be the ##article alias/article ID## of the article information, you will arrive to the detail content of the news by a click on a read more .... . You can check out Ben's Video as your starting point... Very important: take care to set up unique tags. \\ ==== Special News template by Ben ==== Forum: [[http://forum.phpwcms.org/viewtopic.php?p=104366#p104366]] Autor: Ben I have been playing around with the news template. I have created a news listing and added some CSS if anyone would like to use it. I have added a border to the image with CSS and made the image a link to the article I have made the article title a link I have removed the main article title added the live date to the article detail with 'created on' and added 'by' as in 'written by' to the template to show the authors name (ideally should have added it to the php file) so it will show as: Written on 31-05-2008 by Ben, Middlesbrough I've also added a horizontal line to separate the teaser listing It has not been tested in IE6 ; how many news should be listed per row news_per_row = 2 ; teaser text rendered as

= p ; or just line break to
= 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_per_row = 1 [TITLE]

{TITLE}

[/TITLE] [SUBTITLE]

{SUBTITLE}

[/SUBTITLE]
[NEWS_ENTRIES]{NEWS_ENTRIES}[/NEWS_ENTRIES]
[IMAGE]
{CAPTION}
[/IMAGE] [NEWS_TITLE]

{NEWS_TITLE}

[/NEWS_TITLE] [NEWS_TEASER]
{NEWS_TEASER}
[/NEWS_TEASER] [NEWS_TEASER_ELSE][NEWS_TEXT]{NEWS_TEXT}[/NEWS_TEXT][/NEWS_TEASER_ELSE] [NEWS_DETAIL_LINK][/NEWS_DETAIL_LINK]
[NEWS_ENTRIES]{NEWS_ENTRIES}[/NEWS_ENTRIES]
[NEWS_TITLE]

{NEWS_TITLE}

[/NEWS_TITLE] [NEWS_SUBTITLE]

{NEWS_SUBTITLE}

[/NEWS_SUBTITLE] [NEWS_TOPIC]

Written on {LIVEDATE:d-m-Y lang=EN} by [AUTHOR]{AUTHOR}[PLACE], {PLACE}[/PLACE][/AUTHOR][AUTHOR_ELSE][PLACE], {PLACE}[/PLACE][/AUTHOR_ELSE]

[/NEWS_TOPIC] [IMAGE] [ZOOM_ELSE] [IMAGE_URL][/IMAGE_URL]
{CAPTION}
[IMAGE_URL]
[/IMAGE_URL] [/ZOOM_ELSE] [ZOOM]
{CAPTION}
[/ZOOM] [/IMAGE] [NEWS_TEXT]
{NEWS_TEXT}
[/NEWS_TEXT] [NEWS_TEXT_ELSE][NEWS_TEASER]{NEWS_TEASER}[/NEWS_TEASER][/NEWS_TEXT_ELSE] [URL]

[URL_TEXT]{URL_TEXT}[/URL_TEXT][URL_TEXT_ELSE]more[/URL_TEXT_ELSE]

[/URL] [FILES]{FILES}[/FILES] [NEWS_LIST_LINK] [/NEWS_LIST_LINK]
/* ------- start news --------- */ .newsEntry { padding: 5px 0 0px 0; } .newsImageTeaser { float:left; border: 5px solid #f6ecee; margin: 0px 10px 5px 0; padding: 0px 0px 0 0; } .newsImageDetail { float:left; border: 5px solid #f6ecee; margin: 4px 10px 5px 0; padding: 0px 0px 0 0; } .news_teaser { text-align: justify; } .news_text{ text-align: justify; } .hrNews{ margin: 0px 0 0px 0; padding: 5px 0 0px 0; height:0; border:0; border-bottom:1px dotted #CCCCCC; clear:both; } /* ------- end news --------- */ === Content part === * To add news create an article and add the news content part. I've found that you need to specify a language in both the news content part and news article, English = en * type a name in the archive and news article boxes, i use type 'archive' and 'article' * Then save. === News article === * The articles are pretty straight forward. * click on news on the left nav * create new news article * fill in all the boxes needed. * Add title (leave the title/alias at the top as this will be based on main title automatically) * fill in language English = en * put text in teaser and in the wysiwyg * check publish * create \\ ==== Video ==== Forum: [[http://forum.phpwcms.org/viewtopic.php?p=105038#p105038]] Autor: Ben \\