- This topic is empty.
August 13, 2011 at 4:27 am #33896aoeuiParticipant
once more could use your knowledge
I am php real beginner
I am trying to achive in one common header.php + footer.php
that is easy = 1 file, include far all pages
do not know how to ECHO (or something) only .CSS + .JS for specific page
because obivously there is no need to have lightbox.css / .jd + slider.css / .js on every page
any hints how to do it?August 13, 2011 at 4:52 am #84940
I believe what you’re asking is how to dynamically use a header and footer? Use php includesAugust 13, 2011 at 9:31 am #84944johnsonprMember
@krysak4ever i hope this solves ur issue:
create a separate file namely xyz.php and in that file u can call ur scripts or css pagewise for example:
And then in ur header.php just include the xyz.php file u created above, this way u dont need to even give an id to the body also
Just remember one thing that u need to specify the full file name like index.php or gallery.php and not index/ or gallery/ which i guess you might be getting after you use the earlier .htaccess tip :)August 13, 2011 at 9:36 am #84945johnsonprMember
@krysak4eve Sorry i just noticed that i made a mistake this would be the contents of the xyz.php file :P
August 13, 2011 at 7:39 pm #84968
@krysak4ever – Aah, I understand what you mean. You need an if..else statement. Basically, if page equals index.php, display slider, Else, display lightbox. Is that exactly what you want?
Are you using a CMS such as WordPress?
What are the names of your .php pages?
How many pages do you plan to have?August 14, 2011 at 6:37 am #84977
Why just those 2 files? Why not the whole header?August 14, 2011 at 7:15 am #84980
-Not sure how this is working when you have no phpAugust 14, 2011 at 9:01 am #84981
@krysak4ever After reading through this, I’m very confused as is seems you want different things.
What I think you want is to display a slider on one page and lightbox on the other, correct?August 14, 2011 at 9:38 am #84983
You could but honestly there’s no point to doing that. Either load slider.css or don’t
- The forum ‘Back End’ is closed to new topics and replies.