Jump to content

The tutorial of Philip Reiner: href problem


Recommended Posts

Hi, I see this tutorial (but not listen it because I'm italian and don't understand english speaking).
I choose this CSS Framework for my homepage, but in my homepage don't appear any image. It's as it not exist, and it is as don't exist any css or js. 

But in my pc on my browser all work very well. 

As I see in the video tutorial of Philip Reiner, I create a new Template File, new page, new folders by ftp with css, jss, images...
Then, in my Template File I copy the index file of CSS Framework Package and replace the old url with this:

 

...

<script src="<?=$config->urls->templates;?>js/skel.min.js"></script>
        <script src="
<?=$config->urls->templates;?>js/init.js"></script>
        <noscript>
            <link rel="stylesheet" href="
<?=$config->urls->templates;?>css/skel.css" />
            <link rel="stylesheet" href="
<?=$config->urls->templates;?>css/style.css" />
            <link rel="stylesheet" href="
<?=$config->urls->templates;?>css/style-wide.css" />
            <link rel="stylesheet" href="
<?=$config->urls->templates;?>css/style-noscript.css" />
        </noscript>

...

 

 

My page is http://www.casbook.org
The words there are, but there aren't any css-js! To Philip happen this too, but then in an istant he risolution all and appear menù and colours and css. When he change href! 
I changed href but all is remain as before: white and black, less images.

Anyone can help me??
I can pay too for this problem, but only a little quantity of money!

 

Edited by cstevensjr
Moved this to General Support as this is a problem (issue), not a tutorial
Link to comment
Share on other sites

Thanks Adrian! I removed the folder "TFhome-assetto" and I moved "css" "font" "js" "sass" into the folder "Templates". But I see that don't work neither and the image of background don't start. All white and black always.
Have you another suggest for me please?

DaveP. I write "urls" this word exactly, but peraphs I must change it with any true url??

Peraphs, must I add the background image by panel of processwire?

Peraphs, must I add <?=$config->urls->templates;?> in ALL href of the ALL css and js files of the theme??
In the panel I create the Template with 3 field: "title, headline, body"; then I associated this Template at homepage.
The template "TFhome.php" is a cut-copy of the index.html that I found online in package CSS Framework free, with the folders "css" "font" "js" "sass" of the theme "ARIEAL".

Link to comment
Share on other sites

The path to those is still incorrect - you are calling them from: http://www.casbook.org/site/templates/js/init.js

and you are linking to: css/style-wide.css

That means that the browser is trying to load: http://www.casbook.org/site/templates/js/css/style-wide.css because the css folder is relative to the js folder where the init.js file is.

There are lots of options to make this work so I can't give you a definitive approach, but you could simply replace:
css/style-wide.css with /site/templates/css/style-wide.css

Link to comment
Share on other sites

  • 2 weeks later...

Hi, Adrian. I take an holiday because I was tired.
Now, my new site made with processwire for an experiment is: http://diofralealtrecoseparla.newageofcattolicesimo.it 

 

Excuse me but I don'understand where to replace css/style-wide.css with /site/templates/css/style-wide.css

I did any replacement but don't work.

In my Template File TF1.php into templates folder there is write:

 

-->
<html>
    <head>
        <title>Permacultura Organica 3.1</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <!--[if lte IE 8]><script src="<?=$config->urls->templates;?>css/ie/html5shiv.js"></script><![endif]-->
        <script type="text/javascript" src="<?php echo $config->urls->templates;?>js/skel.min.js"></script>
        <script type="text/javascript" src="<?php echo $config->urls->templates;?>js/init.js"></script>
        <noscript>
            <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>css/skel.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>css/style.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>css/style-wide.css" />    I replaced here "css/style-wide.css" with "site/templates/css/style-wide.css", but it did'nt working!
            <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>css/style-noscript.css" />
        </noscript>
        <!--[if lte IE 9]><link rel="stylesheet" href="<?=$config->urls->templates;?>css/ie/v9.css" /><![endif]-->
        <!--[if lte IE 8]><link rel="stylesheet" href="<?=$config->urls->templates;?>templates;?>css/ie/v8.css" /><![endif]-->
    </head>

 

I must change anything in it? There is any wrong? 
I must change the blu words, the green sections or the red phrases?

 

 

 

In file: init.js into js folder, there is write this:

*/

// Skel.
    skel.init({
        reset: 'full',
        breakpoints: {
            'global': { range: '*', href: 'css/style.css', lockViewport: true, viewport: 'minimal-ui' },
            'wide': { range: '-1680', href: 'css/style-wide.css' },  I replaced here "css/style-wide.css" with "site/templates/css/style-wide.css", but it did'nt working!
            'normal': { range: '-1280', href: 'css/style-normal.css' },
            'mobile': { range: '-640', href: 'css/style-mobile.css' },
            'mobilep': { range: '-360', href: 'css/style-mobilep.css' }
        }
    });

I must change anything in green part? There is any wrong?

 

I hope someone help me...

 

 

 

 

 

Link to comment
Share on other sites

Link to comment
Share on other sites

Fantastic! Wonderfull! Now work all! 
I red your link and I put "/site/templates/" with "/" before. ^-^

But I have an last question: 

In the Philiph Reiner's Guide, he put <?=$config->urls->templates;?> and not "/site/templates/".

Why, in your opinion??

Perhaps, I would have to put: /site/<?=$config->urls->templates;?>/css/etc ?

 

Thank you a lot

 

Link to comment
Share on other sites

<?=$config->urls->templates;?>

would be a better solution. It is abstracting the path away to PW's config metadata which is generally a good thing in case there is ever a reason to change things.

That is actually the same as: /site/templates/, so no need to prepend /site/ to make it work.

Take a look at the options in the cheatsheet: http://cheatsheet.processwire.com/?filter=config->urls

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...