PDA

View Full Version : How do I make some HTML changes only on the front page?


ilushkin
08-10-2005, 01:27 AM
As I see if I add some html code on main.tpl The changes automatically applied to all categories. What if I want to edit only front page? what do I do?
///hint: maybe has something to do with main2.tpl???

yktan
08-10-2005, 02:56 AM
Hi ilushkin, in main.tpl, just enclose whatever you want to display for the first screen in an if statement with category id equals to zero. For example this:
Content visible to registered users only.

Regards,
YK

ilushkin
08-10-2005, 02:48 PM
Content visible to registered users only.
Thank you it works perfectly.

David
08-10-2005, 05:47 PM
I assume this method could be used to make changes to individual category pages too. :)

Ap0s7le
08-10-2005, 06:00 PM
Of course.

Using the ID is nice for seperate images on each category as well.

later

-Casey

kickass
08-11-2005, 02:33 PM
This is the kind of stuff that belongs in the wiki :D Unfortunately I'm short of time.

ilushkin
08-13-2005, 06:52 PM
Content visible to registered users only.
Thank you it works perfectly.[/quote]
Looks good but now <h1> This is the first screen! </h1> comes on The Latest Links Category and Top Hits, which is far from the first screen :(

yktan
08-14-2005, 07:00 AM
Hi ilushkin,

If you don't want the text to show up in Latest Links or Top Hits, just use this instead:

Content visible to registered users only.

Regards,
YK

ilushkin
08-14-2005, 04:40 PM
Content visible to registered users only.
beautiful :) thank you!

superlinks
08-15-2005, 10:27 PM
Content visible to registered users only.

Can there be more than to variables? Like $p and $id?

rawaccess
08-22-2005, 06:28 PM
alright, lets expand on this.

is there a way to have code NOT appear on the SUBMIT page? i dont want a javascript counter to appear there.

in the meantime, i will look in the db to see if there is a clue based on what is already posted.

yktan
08-23-2005, 03:57 AM
Content visible to registered users only.

Can there be more than to variables? Like $p and $id?[/quote]

Hi, I'm not sure what you mean exactly, but yes, you can have more than 1 variable in the comparison. Take the quoted text above for example, the if statements is comparing against $category.ID and $p.

Regards,
YK

yktan
08-23-2005, 04:03 AM
Content visible to registered users only.

Hi rawaccess, if you inserted the code above in main.tpl, it would not appear in the SUBMIT page. May I know what exactly do you mean?

Thanks.

YK

rawaccess
08-23-2005, 10:51 AM
so, what are the options?

we can have code only appear on the first page
code can appear on first page plus top hits and/or new links page.
we can have code appear on all pages.

this i have learned.

but can we have code (javascript in my case) appear on all pages except the submit page without having to insert the code on each page manually?

yktan
08-23-2005, 11:30 AM
Content visible to registered users only.

Hi rawaccess, you insert the javascript in main.tpl, it will appear in all on all pages except the submit page and admin pages.

Regards,
YK