Просмотр полной версии : Меню и фреймы
Дорого времени суток! Опытом большим не обладаю, только недавно с TYPO3 "снюхался" :), поэтому не пинайте , если глупости буду спрашивать :)
Подскажите пожалуйста в чем заблуждение ? Есть дерево страниц
QQQ -root:
QQQ (id 2)
-----> AAA (id 3)
QQQ SetUp:
#*****************
page = PAGE
menu = PAGE
top = PAGE
page.typeNum = 1
menu.typeNum = 2
top.typeNum = 3
page.bodyTag = <BODY bgcolor="#cccccc"/>
page.10 = HTML
page.10.value = <B> Привет </B>
menu.bodyTag = <BODY bgcolor="#5e759d"/>
menu.10 = HMENU
menu.10.1 = TMENU
menu.10.1.NO {
linkWrap = <BR><FONT color="#ffffff"> | </FONT><BR>
ATagBeforeWrap = 1
}
top.bodyTag = <BODY bgcolor="#2e4e87"/>
top.10 = IMAGE
top.10.file = fileadmin/templates/frames/img/top.jpg
outer_frameset = PAGE
outer_frameset.typeNum = 0
outer_frameset.frameSet.rows = 85,*
outer_frameset.frameSet.params = framespacing="0" bordercolor="#FFFFFF" frameborder="O" border="0"
outer_frameset.frameSet {
1 = FRAME
1.obj = top
1.params = frameborder="0" noresize marginheight="0" border="0" scrolling="NO"
2 = FRAMESET
2.params = framespacing="0" bordercolor="#FFFFFF" frameborder="0" border="0" marginheight="0"
border="0"
2.cols = 180, *
2 {
1 = FRAME
1.obj = menu
1.params = frameborder="1" noresize marginheight="0" border="0" scrolling="NO"
2 = FRAME
2.obj = page
2.params = frameborder="1" marginheight="0" border="0" scrolling="AUTO"
}
}
#
AAA SetUp:
#********************
temp = TEMPLATE
temp {
template = FILE
template.file = fileadmin/templates/frames/phone.html
}
page = PAGE
page.typeNum = 1
page.10 < temp
Собсно вопрос: почему при кликанье на странице QQQ на ссылку AAA чего-то пытается грузиться во фрейме, где расположено меню (menu), а не в нужном фрейме (page). При этом ничего не загружается, а просто кусок картинки из верхнего фрейма (top) размножается, смещая меню вниз... Если обратиться непосредственно по адресу используя id =3, то страница нормально прогружается.
Подскажите пожалуйста чего я неправильно сделал ?
Неужели никто не может помочь мне в этом вопросе ? Уже попробовал в разных браузерах - результат один и тот же => проблема в коде, похоже что-то чего я просто не знаю. Гуру отзовитесь, а то я даже не знаю куда копнуть :(
вроде как по фреймам тут нет знатоков - судя по поиску по слову frame
кстати в админке typo3 4.2 отказались от фреймов. поначалу показалось не очень удобно - но использование AJAX позволяет отказаться от фреймов. Кроме того там очень удобно стало - нажимаешь на среднюю кнопочку-треугольник - и дерево скрвается - зато рабочая область становится большой
-=UncleByte=-
27.08.2008, 11:20
Заблуждение в использовании фреймов в 21-м веке.
Попробуйте сделать нормальный шаблон.
Заблуждение в использовании фреймов в 21-м веке.
Попробуйте сделать нормальный шаблон.
Не совсем понимаю как сделать без фреймов прокрутку основной страницы, но так чтобы картинка вверху и меню оставались на месте ?
Fearless Goblin
27.08.2008, 14:27
Не совсем понимаю как сделать без фреймов прокрутку основной страницы, но так чтобы картинка вверху и меню оставались на месте ?
Используйте CSS. В частности свойство overflow со значением scroll или auto.
Используйте CSS. В частности свойство overflow со значением scroll или auto.
А можно примерчик если не сложно ?
Fearless Goblin
27.08.2008, 15:32
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>overflow</title>
<style type="text/css">
.header {
height: 20px;
background-color: red;
}
.body {
overflow: auto;
height: 400px;
}
.footer {
height: 20px;
background-color: green;
}
</style>
</head>
<body>
<div class="header">Something in the header</div>
<div class="body">
<h2>Definition</h2>
<p>The overflow property sets what happens if the content of an element overflow its area. </p>
<p><b>Inherited:</b> No</p>
<hr />
<h2><b>JavaScript Syntax</b></h2>
<p>CSS properties can also be dynamically changed with a JavaScript.</p>
<p><b>Scripting Syntax:</b> <i>object</i>.style.overflow="hidden"</p>
<hr />
<h2>Example</h2>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<td valign="top">
<p>p <br />
{<br />
overflow: scroll<br />
}</p>
</td>
</tr>
</table>
<h2>Possible Values</h2>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th align="left" valign="top">Value</th>
<th align="left" valign="top">Description</th>
</tr>
<tr>
<td valign="top">visible</td>
<td valign="top">Default. The content is not clipped. It renders outside the element</td>
</tr>
<tr>
<td valign="top">hidden</td>
<td valign="top">The content is clipped, but the browser does not display a
scroll-bar to see the rest of the content </td>
</tr>
<tr>
<td valign="top">scroll</td>
<td valign="top">The content is clipped, but the browser displays a
scroll-bar to see the rest of the content</td>
</tr>
<tr>
<td valign="top">auto</td>
<td valign="top">If the content is clipped, the browser should display a
scroll-bar to see the rest of the content</td>
</tr>
</table>
<br />
</div>
<div class="footer">Something in the footer</div>
</body>
</html>
Пример очень простой, но идея, думаю, понятна :)
Добавлено: кстати, на форуме тоже используется это же свойство. Например, в этом моём посте выложено большое количество кода, которое отображается в обычном div-е с тем же overflow.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>overflow</title>
<style type="text/css">
.header {
height: 20px;
background-color: red;
}
.body {
overflow: auto;
height: 400px;
}
.footer {
height: 20px;
background-color: green;
}
</style>
</head>
<body>
<div class="header">Something in the header</div>
<div class="body">
<h2>Definition</h2>
<p>The overflow property sets what happens if the content of an element overflow its area. </p>
<p><b>Inherited:</b> No</p>
<hr />
<h2><b>JavaScript Syntax</b></h2>
<p>CSS properties can also be dynamically changed with a JavaScript.</p>
<p><b>Scripting Syntax:</b> <i>object</i>.style.overflow="hidden"</p>
<hr />
<h2>Example</h2>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<td valign="top">
<p>p <br />
{<br />
overflow: scroll<br />
}</p>
</td>
</tr>
</table>
<h2>Possible Values</h2>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th align="left" valign="top">Value</th>
<th align="left" valign="top">Description</th>
</tr>
<tr>
<td valign="top">visible</td>
<td valign="top">Default. The content is not clipped. It renders outside the element</td>
</tr>
<tr>
<td valign="top">hidden</td>
<td valign="top">The content is clipped, but the browser does not display a
scroll-bar to see the rest of the content </td>
</tr>
<tr>
<td valign="top">scroll</td>
<td valign="top">The content is clipped, but the browser displays a
scroll-bar to see the rest of the content</td>
</tr>
<tr>
<td valign="top">auto</td>
<td valign="top">If the content is clipped, the browser should display a
scroll-bar to see the rest of the content</td>
</tr>
</table>
<br />
</div>
<div class="footer">Something in the footer</div>
</body>
</html>
Пример очень простой, но идея, думаю, понятна :)
Добавлено: кстати, на форуме тоже используется это же свойство. Например, в этом моём посте выложено большое количество кода, которое отображается в обычном div-е с тем же overflow.
Огромное спасибо !!! Бум творить :)
Fearless Goblin
27.08.2008, 16:27
Пожалуйста :)
Удачи в разработках! ;)
Работает на vBulletin® версия 3.8.1. Copyright ©2000-2025, Jelsoft Enterprises Ltd. Перевод: zCarot