Необычный вывод последних новостей DLE на главной

32
На сайте с 07.02.2011
Offline
76
4638

Приветствую!

Подскажите, пожалуйста, если кто знает,

как сделать на главной странице три блока в 5 колонок с выводом последних новостей из определенных категорий DLE?

Скриншот:

http://rghost.ru/4842922/image.png

Спасибо.

[Удален]
#1

Для примера накидал.

[aviable=main]

<table width="100%" border="0">

<tr>

<td>{custom category="1" template="файл.tpl" aviable="main" from="0" limit="1" cache="yes"}</td>

<td>{custom category="1" template="файл.tpl" aviable="main" from="1" limit="1" cache="yes"}</td>

<td>{custom category="1" template="файл.tpl" aviable="main" from="2" limit="1" cache="yes"}</td>

<td>{custom category="1" template="файл.tpl" aviable="main" from="3" limit="1" cache="yes"}</td>

<td>{custom category="1" template="файл.tpl" aviable="main" from="4" limit="1" cache="yes"}</td>

</tr>

<tr>

<td>{custom category="2" template="файл.tpl" aviable="main" from="0" limit="1" cache="yes"}</td>

<td>{custom category="2" template="файл.tpl" aviable="main" from="1" limit="1" cache="yes"}</td>

<td>{custom category="2" template="файл.tpl" aviable="main" from="2" limit="1" cache="yes"}</td>

<td>{custom category="2" template="файл.tpl" aviable="main" from="3" limit="1" cache="yes"}</td>

<td>{custom category="2" template="файл.tpl" aviable="main" from="4" limit="1" cache="yes"}</td>

</tr>

<tr>

<td>{custom category="3" template="файл.tpl" aviable="main" from="0" limit="1" cache="yes"}</td>

<td>{custom category="3" template="файл.tpl" aviable="main" from="1" limit="1" cache="yes"}</td>

<td>{custom category="3" template="файл.tpl" aviable="main" from="2" limit="1" cache="yes"}</td>

<td>{custom category="3" template="файл.tpl" aviable="main" from="3" limit="1" cache="yes"}</td>

<td>{custom category="3" template="файл.tpl" aviable="main" from="4" limit="1" cache="yes"}</td>

</tr>

</table>

[/aviable]

И создаешь файл custom.tpl или в нашем случае заменяем файл.tpl на свое (или несколько, если хочешь разные дизайны под определенную категорию)

vandamme
На сайте с 30.11.2008
Offline
675
#2
alextrish:
<td>{custom category="1" template="файл.tpl" aviable="main" from="0" limit="1" cache="yes"}</td>
<td>{custom category="1" template="файл.tpl" aviable="main" from="1" limit="1" cache="yes"}</td>
<td>{custom category="1" template="файл.tpl" aviable="main" from="2" limit="1" cache="yes"}</td>
<td>{custom category="1" template="файл.tpl" aviable="main" from="3" limit="1" cache="yes"}</td>
<td>{custom category="1" template="файл.tpl" aviable="main" from="4" limit="1" cache="yes"}</td>

5строк можно заменить одной

{custom category="1" template="файл.tpl" aviable="main" from="0" limit="4" cache="yes"}

файл файл.tpl

<td>код</td>

[Удален]
#3

можно и так

32
На сайте с 07.02.2011
Offline
76
#4

Всем Спасибо огромное!

а, как-то можно вернуть картинку в виде ссылки на полную новость.

у меня превью картинка была в виде ссылки на полною новость,

а сейчас получилось, что при клике на картинку показывает картинку оригинального размера.

[Удален]
#5

[full-link][xfgiven_picture]<img src="[xfvalue_picture]" width="X" height="X" border="0" align="left" alt="" />[/xfgiven_picture][/full-link]

x-твои значения

32
На сайте с 07.02.2011
Offline
76
#6
alextrish:
[full-link][xfgiven_picture]<img src="[xfvalue_picture]" width="X" height="X" border="0" align="left" alt="" />[/xfgiven_picture][/full-link]

x-твои значения

что-то нет изменений.

а, дубликат вывода новостей, который показывает файл shortstory.tpl, как-то убрать можно? а то получаются повторы.

куча превью одни ссылаются на оригинал картинки, а другие на полные новости.

vandamme
На сайте с 30.11.2008
Offline
675
#7
alextrish:
[xfvalue_picture]

тогда название поля у тебя должно быть picture

32
На сайте с 07.02.2011
Offline
76
#8
vandamme:
тогда название поля у тебя должно быть picture

прописал picture и тоже самое показывает в превью слайд-шоу.

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий