Jump to content

[SOLVED] Possible not to show something from the layout.tpl file?


James142

Recommended Posts

What I had to do on mine was do a little minor css work and then edit every single template file that shows up on my site. Man did it suck! Anything on the layout is going to show up on your site. I fooled the system, but it took me a couple few hours to do.

Link to comment
Share on other sites

I was trying to get a sidebar filled with tables to only show up on the index.php. IF i added it to the frontpage_main.tpl file, it showed up on the bottom of the page.

I have decided to leave it now, thanks for the help anyway.

James

James after the race is over, I will jump on my pc and tell you what I did to hide my sidearea on all pages but the front page. It is a bunch of work but do-able

Link to comment
Share on other sites

Sorry for the slow reply.

I am sure there is an easier way to do this but this is how I did it. I have NO sidearea on any page of my brilliance site except for the front page.

I copied the main area in the css and pasted it back in the css. I changes the class from mainarea to main area2 and got rid of the image and widened it up to match the width of the site.

Then on every single tpl file there is, you need to add a new div at the top of the page for your new mainarea2. Then close the div at the end of the page twice.

So it is like this.

<div id="mainarea2">
//Pages content is here on the tpl file
</div>
</div>

Doing it this way, I have to put this code in every single tpl file that shows up to the public on site. So ALL of the tpl files dam near in the core/templates file ended up being put in my Brilliance folder.

It is time consuming, but works good.

  • Like 1
Link to comment
Share on other sites

Sorry for the slow reply.

I am sure there is an easier way to do this but this is how I did it. I have NO sidearea on any page of my brilliance site except for the front page.

I copied the main area in the css and pasted it back in the css. I changes the class from mainarea to main area2 and got rid of the image and widened it up to match the width of the site.

Then on every single tpl file there is, you need to add a new div at the top of the page for your new mainarea2. Then close the div at the end of the page twice.

So it is like this.

<div id="mainarea2">
//Pages content is here on the tpl file
</div>
</div>

Doing it this way, I have to put this code in every single tpl file that shows up to the public on site. So ALL of the tpl files dam near in the core/templates file ended up being put in my Brilliance folder.

It is time consuming, but works good.

Ill try it now..

Thanks!

Link to comment
Share on other sites

If you only want it to appear on the frontpage:

<?php
if(MainController::$activeModule == 'FRONTPAGE'){ ?>
<!-- Do stuff -->
<?php } ?>

Hi Tom. I tried that repeatedly on the Brilliance template without good results. Errors kept flying all over the place. I might not have done it right. I got tired of fussing with it and did it my way. The problem with doing it that way and NOT reworking the css is the dreaded sidearea image and blank white space left over on the right side when done. Nothing moves. I pulled it off rather easily using Obsessblue, but Brilliance was a pain in the arse to do the say the least.

I hope he can get it to work using the way you suggested, and originally how Simpilot told me too. It is much easier than how I did it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...