I always search for answer before asking question and I found many similar thread waht I am asking but I tried everthing suggested there and also my query is little differnt.
so what I want.
I want..on front page :
Front Blocks and Forum post should be available. (Ok I did it by showing forum post on front page and then "FRONT blocks to showed first")
So all fine..
Next I added an article and unchecked to not to show any block.. but unfortunately not option their to hide front block..
So now with every article we have front blocks added first also. I was not able to find any solution to it.
I can choose "Show Front block Normal ie. show alone" then it won't show on front page.
Also if I choose to show "Show front block on front page" then only front blocks are shown but no forum posts..
so anybody hving any solution ?
... Hello.. its been many days.. any light ?
Don't know if I totally follow what it is your after but think this might be of help. divide your welcome block into tables. I'm currently putting a site together with tables. As of now there is 4 tables in the welcome block http://helpearl.info
Using source on the editor add the code below. You can add <td>'s as long as they equal 100%. or adjust the <td> width to fit your needs but if you specify a height then you will end up with blank spots on the page. You can repeat the complete table as many times as you like.
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="75%" valign="top">
YOUR STUFF HERE
</td>
<td width="25%" valign="top">
YOUR STUFF HERE
</td>
</tr>
</tbody>
</table>
Well.. I guess I was not clear in my question, anyways.. thanx for your effort.
What I actually want that FRONT page block should not appear on ARticles....
Anyways..
Anybody know that if following condition can check whether I am on front page or not :::
$context['current_action'] == 'index'
If you dont want to have any blocks visible on the frontpage, simply turn the panels off. And have the frontpage in TP settings to show only articles.
Have created 4 front page blocks which I am using on front page.
The problem is that those frontpage blocks are also there on any of the article page. What I want is that those front page block should not appear on any article page.
I think the functions you seek are not possible until the next release of TP.
There you will be able to show or not show blocks with a lot more options then TP V098 so you have to hold on until it gets released, cant say when though :-\
G6,
alternatively I can check URL using php and hide code in those blocks.. ..
Problem is that I still hv no proper knowledge of PHP...
Looking around web found this :
<?php
function selfURL() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2) {
return substr($s1, 0, strpos($s1, $s2));
}
?>
so if url is exactly : /index.php or /
I can hide the blocks..
any light on this ?
if ($context['TPortal']['is_front']) is what you are looking for.
Ok.. I enclosed my front page TP blocks in ..
if ($context['TPortal']['is_front'])
{
}
but no effect. My those TP blocks are without title and body from frame from theme so if this works then I can completly hide the block.
Also, I nee make a block which appear only on posting page. ... so if something similar possble in that case too ???
Can you please use the search. The options you are asking for are not "part of TP" yet. You will need to use the custom PHP code to get what you want. And I know that it has already been posted plenty of times.
I spent more than a hour before starting this thread, infact I searched many times previously .. but did not find solution.
Its not part of TP but may be some fellow member can help .. that is all the purpose of this thread.
Check if you can find something similar to what you want in the block code and snippets board.
From your code posted earlier, i think you need to add the global statment for it to work.
Where did you encase your frontpage blocks with this code?
What I get from your question that you are asking that where I used this code ?
Well I have created few php front blocks.. then I tried to enclose all that PHP code in the IF STATEMENT you gave.
Post your code?