<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Strawberry форум &mdash; При определенной тсраницы свой css дляменю]]></title>
	<link rel="self" href="http://strawberry.goodgirl.ru/forum/feed/atom/topic/3714/"/>
	<updated>2010-02-19T21:22:03Z</updated>
	<generator>PunBB</generator>
	<id>http://strawberry.goodgirl.ru/forum/topic/3714/</id>
		<entry>
			<title type="html"><![CDATA[Re: При определенной тсраницы свой css дляменю]]></title>
			<link rel="alternate" href="http://strawberry.goodgirl.ru/forum/post/15726/#p15726"/>
			<content type="html"><![CDATA[<p><strong>Killa</strong>, сделал так, как Вы написали - всё получается, при этом можно вместо названия категории написать динамический код.</p><p>Ваш код работает, но выделяется название категории только в самой категории , тоесть - <strong>/politik/</strong>.</p><p>А вот при открытии новости из категории название категории не выделяется.</p><p>Код пробовал такого вида:</p><div class="codebox"><pre><code>&lt;?php $id_serv= $_SERVER[&#039;REQUEST_URI&#039;];
if ($id_serv == &quot;/politik&quot;) {
echo &#039;&lt;a href=&quot;../politik&quot; class=&quot;active&quot;&gt;&lt;span&gt;Политика&lt;/span&gt;&lt;/a&gt;&#039;;
} else {
echo &#039;&lt;a href=&quot;../politik&quot;&gt;&lt;span&gt;Политика&lt;/span&gt;&lt;/a&gt;&#039;;
} ?&gt;</code></pre></div><p>Код <strong>ANT-Soft</strong>а почемуто не заработал, кроме выделения страницы <strong>Главная</strong>...</p>]]></content>
			<author>
				<name><![CDATA[olafsen]]></name>
				<uri>http://strawberry.goodgirl.ru/forum/user/798/</uri>
			</author>
			<updated>2010-02-19T21:22:03Z</updated>
			<id>http://strawberry.goodgirl.ru/forum/post/15726/#p15726</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: При определенной тсраницы свой css дляменю]]></title>
			<link rel="alternate" href="http://strawberry.goodgirl.ru/forum/post/15549/#p15549"/>
			<content type="html"><![CDATA[<p>понял спасибо <img src="http://strawberry.goodgirl.ru/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Killa]]></name>
				<uri>http://strawberry.goodgirl.ru/forum/user/6449/</uri>
			</author>
			<updated>2010-02-02T09:53:43Z</updated>
			<id>http://strawberry.goodgirl.ru/forum/post/15549/#p15549</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: При определенной тсраницы свой css дляменю]]></title>
			<link rel="alternate" href="http://strawberry.goodgirl.ru/forum/post/15548/#p15548"/>
			<content type="html"><![CDATA[<p><strong>Killa</strong>, оптимальнее не придумаешь: </p><div class="codebox"><pre><code>&lt;style&gt;
.active_link {font-weight: bold;}
&lt;/style&gt;

&lt;div&lt;?=(!$HTTP_SERVER_VARS[&#039;QUERY_STRING&#039;] ? &#039; class=&quot;active_link&quot;&#039; : &#039;&#039;); ?&gt;&gt;&lt;a href=&quot;index.php&quot;&gt;Главная&lt;/a&gt;&lt;/div&gt;

&lt;div&lt;?=($_GET[&#039;id&#039;] == &#039;zakaz&#039; ? &#039; class=&quot;active_link&quot;&#039; : &#039;&#039;); ?&gt;&gt;&lt;a href=&quot;index.php?id=zakaz&quot;&gt;Заказ&lt;/a&gt;&lt;/div&gt;

&lt;div&lt;?=($_GET[&#039;id&#039;] == &#039;yslugi&#039; ? &#039; class=&quot;active_link&quot;&#039; : &#039;&#039;); ?&gt;&gt;&lt;a href=&quot;index.php?id=yslugi&quot;&gt;Услуги&lt;/a&gt;&lt;/div&gt;</code></pre></div><p>Извините, давайте закончим эту тему? А то ещё немного и я за вас весь интерфейс сайта напишу <img src="http://strawberry.goodgirl.ru/forum/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[ANT-Soft]]></name>
				<uri>http://strawberry.goodgirl.ru/forum/user/43/</uri>
			</author>
			<updated>2010-02-02T03:17:49Z</updated>
			<id>http://strawberry.goodgirl.ru/forum/post/15548/#p15548</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: При определенной тсраницы свой css дляменю]]></title>
			<link rel="alternate" href="http://strawberry.goodgirl.ru/forum/post/15546/#p15546"/>
			<content type="html"><![CDATA[<p>Спасибо да так лучше, а возможно ли еще больше сократить код? он у меня сейчас примерно выглядит так:</p><div class="codebox"><pre><code>&lt;?php

if (!$HTTP_SERVER_VARS[&#039;QUERY_STRING&#039;]) {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php&quot;&gt;&lt;b&gt;Главная&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&#039;;

} else {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php&quot;&gt;Главная&lt;/a&gt;&lt;br&gt;&#039;;

} 
?&gt;

&lt;?php

if (!$HTTP_SERVER_VARS[&#039;QUERY_STRING&#039;]) {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php?id=zakaz&quot;&gt;&lt;b&gt;Заказ&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&#039;;

} else {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php?id=zakaz&quot;&gt;Главная&lt;/a&gt;&lt;br&gt;&#039;;

} 
?&gt;


&lt;?php

if (!$HTTP_SERVER_VARS[&#039;QUERY_STRING&#039;]) {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php?id=yslugi&quot;&gt;&lt;b&gt;Услуги&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&#039;;

} else {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php?id=yslugi&quot;&gt;Услуги&lt;/a&gt;&lt;br&gt;&#039;;

} 
?&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Killa]]></name>
				<uri>http://strawberry.goodgirl.ru/forum/user/6449/</uri>
			</author>
			<updated>2010-02-01T13:02:46Z</updated>
			<id>http://strawberry.goodgirl.ru/forum/post/15546/#p15546</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: При определенной тсраницы свой css дляменю]]></title>
			<link rel="alternate" href="http://strawberry.goodgirl.ru/forum/post/15545/#p15545"/>
			<content type="html"><![CDATA[<p><strong>Killa</strong>, а что тут сумашедшего? Мыслите верно. Но правильнее всё-таки так: </p><div class="codebox"><pre><code>&lt;?php

if (!$HTTP_SERVER_VARS[&#039;QUERY_STRING&#039;]) {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php&quot;&gt;&lt;b&gt;Главная&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&#039;;

} else {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php&quot;&gt;Главная&lt;/a&gt;&lt;br&gt;&#039;;

} 
?&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ANT-Soft]]></name>
				<uri>http://strawberry.goodgirl.ru/forum/user/43/</uri>
			</author>
			<updated>2010-02-01T12:58:49Z</updated>
			<id>http://strawberry.goodgirl.ru/forum/post/15545/#p15545</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: При определенной тсраницы свой css дляменю]]></title>
			<link rel="alternate" href="http://strawberry.goodgirl.ru/forum/post/15540/#p15540"/>
			<content type="html"><![CDATA[<p>спасибо, решил сделать по сумашедшему конечно но верно:</p><div class="codebox"><pre><code>&lt;?php
$id_serv= $_SERVER[&#039;REQUEST_URI&#039;];

if ($id_serv == &quot;/index.php&quot;) {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php&quot;&gt;&lt;b&gt;Главная&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&#039;;

} else {

echo &#039;&amp;nbsp;&lt;a href=&quot;index.php&quot;&gt;Главная&lt;/a&gt;&lt;br&gt;&#039;;

} 
?&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Killa]]></name>
				<uri>http://strawberry.goodgirl.ru/forum/user/6449/</uri>
			</author>
			<updated>2010-02-01T10:13:19Z</updated>
			<id>http://strawberry.goodgirl.ru/forum/post/15540/#p15540</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: При определенной тсраницы свой css дляменю]]></title>
			<link rel="alternate" href="http://strawberry.goodgirl.ru/forum/post/15535/#p15535"/>
			<content type="html"><![CDATA[<p><strong>Killa</strong>, хотя задача немного другая, но решение похожее: <a href="http://strawberry.goodgirl.ru/forum/topic/1442/">http://strawberry.goodgirl.ru/forum/topic/1442/</a> (начиная с поста #8).</p>]]></content>
			<author>
				<name><![CDATA[ANT-Soft]]></name>
				<uri>http://strawberry.goodgirl.ru/forum/user/43/</uri>
			</author>
			<updated>2010-02-01T08:56:42Z</updated>
			<id>http://strawberry.goodgirl.ru/forum/post/15535/#p15535</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[При определенной тсраницы свой css дляменю]]></title>
			<link rel="alternate" href="http://strawberry.goodgirl.ru/forum/post/15534/#p15534"/>
			<content type="html"><![CDATA[<p>Допустим есть меню:<br /></p><div class="codebox"><pre><code>&lt;a href=&quot;index.php?id=1&quot; title=&quot;Главная&quot; id=&quot;text_lnk_menu_1&quot;&gt;1&lt;/a&gt;&lt;br&gt; 
&lt;a href=&quot;index.php?id=2&quot; title=&quot;Новости&quot; id=&quot;text_lnk_menu_1&quot;&gt;2&lt;/a&gt;&lt;br&gt; 
&lt;a href=&quot;index.php?id=3&quot; title=&quot;Новости&quot; id=&quot;text_lnk_menu_1&quot;&gt;3&lt;/a&gt;&lt;br&gt; 
... итд</code></pre></div><p>нужно чтобы к примеру при заходе на страницу <a href="http://www.site.ru/index.php?page=1">http://www.site.ru/index.php?page=1</a> ссылка становилась такой:<br /></p><div class="codebox"><pre><code>&lt;a href=&quot;index.php?page=1&quot; title=&quot;Главная&quot; id=&quot;text_lnk_menu_1&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/a&gt;&lt;br&gt;</code></pre></div><p>при заходе на вторую страницу она так же становилась выделеной<br /></p><div class="codebox"><pre><code>&lt;a href=&quot;index.php?page=2&quot; title=&quot;Новости&quot; id=&quot;text_lnk_menu_1&quot;&gt;&lt;b&gt;2&lt;/b&gt;&lt;/a&gt;&lt;br&gt;</code></pre></div><p>и так далее для каждой ссылки в меню, как это можно реализовать ?</p>]]></content>
			<author>
				<name><![CDATA[Killa]]></name>
				<uri>http://strawberry.goodgirl.ru/forum/user/6449/</uri>
			</author>
			<updated>2010-02-01T07:59:59Z</updated>
			<id>http://strawberry.goodgirl.ru/forum/post/15534/#p15534</id>
		</entry>
</feed>

