473,320 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

problem in relative path

Dear Friends ,

I am developing a cms like blog.

http://domainname.com/blog/cmsindex.php

and any template path are like blog/template/template_name/index.php

In cmsindex.php i am using following code

[PHP]

include('template/template_name/index.php');

[/PHP]


but when i put http://domainname.com/blog/cmsindex.php this URL in browser its does not show the design of template because of template java script file / image file / css file have template path.meand they did not show on the output.

Now i would like to that without any change of template coding can i include any template in cmsindex.php ? all the relative path set .just like blogspot.com where ever user choose template dynamically and on single click they get their blog.


Sanjay
May 19 '08 #1
5 1694
Markus
6,050 Expert 4TB
I'm not grasping your problem too well.

Is the templates dir not in the blog dir?
May 19 '08 #2
Template dir also in blog like same as -

http://domainname.com/blog/template/template_name/
May 19 '08 #3
Markus
6,050 Expert 4TB
So let me get this right:

You have templates in the directory:
www.domain.com/templates/template_name/index.php

and you call this through a cmsindex.php page (include).

However, the css/javascript pages are located in the /templates/ directory and not in the /template_name/ directory.

Am I understanding correctly?

I'm still sketchy.

Where are the css files located?
Are these files included in the /temp_name/index.php file?
May 19 '08 #4
Markus
6,050 Expert 4TB
Another thing - If you're building a cms with customizable templates, shouldn't there be a unique css file for each? i.e. shouldn't each /template_name/ have a css & javascript file?
May 19 '08 #5
Another thing - If you're building a cms with customizable templates, shouldn't there be a unique css file for each? i.e. shouldn't each /template_name/ have a css & javascript file?

its not same but in template dir having a lot of template like (for eg -cofee,nice )
and individual they having thier own css / java script .


but when i call a particular template for eg cofee index.php file in cmsindex.php then its not include all java script css and image file in cmsindex.php

so i would like to soft code that user select their template in dynamic manner and their css file and java script file are automatically included in cmsindex.php


sanjay
May 19 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Doug | last post by:
If I were to write an include with a relative path like include("../conf/config.php"); What is the use? As far as I understand it, the path is relative to the first script that is called by...
10
by: Hywel | last post by:
this script don't work Script A: set session variable <?php class Page0A { function Page0A(){ $this->init(); $this->save();
1
by: Franco Alberto Cardillo | last post by:
Hello everyone. I have the following problem. I am sure that I am doing something very silly, but I cannot figure out what it is. I have the following structure for my Java application: 1)...
1
by: Rafael Campana | last post by:
Hi, I posted the messsage below last week, but no replies, I've reproduced the problem with a VB macro, just create one and paste the following code. Let me know of any workarounds you can...
5
by: | last post by:
Hi, I'm trying to use the cookie munging session handling behaviour of asp.net instead of cookies themselves as I'm finding quite a few people are barring cookies (especially AOL users). If I...
7
by: Nilesh | last post by:
I am using background-image attribute in a CSS file and linking the CSS file to aspx page. But strangly, background-image attribute is not working for relative URL. e.g. If I apply following css...
6
by: openleren | last post by:
Hi all, how can I use a relative path in my web.config file for an Access db?: Instead of using <configuration> <appSettings> <add key="conAccess" value="microsoft.jet.oledb.4.0;data...
1
by: harvey | last post by:
Can anyone tell me how PHP handles paths? Do all functions require fully qualified paths or can some use relative paths? I'm having a problem with a foreach/glob() at the moment but have others...
15
by: Lars Eighner | last post by:
Aside from the deaths of a few extra electrons to spell out the whole root relative path, is there any down side? It seems to me that theoretically it shouldn't make any difference, and it would...
6
by: Royan | last post by:
Ok the problem is quite hard to explain, but i'll try to keep it as simple as i can. Imagine I have the following structure of my files and folders: /root/global.inc |__/files/foo.php...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.