<p>Not sure what your end url is but I think you'll need either a "/" or {{ siteUrl }} before "assets" in "assets/bootstrap/css/bootstrap.min.css".</p>

<p>so (for all references to css etc.)</p>

<pre><code>&lt;link href="{{ siteUrl }}assets/bootstrap/css/bootstrap.min.css" rel="stylesheet"&gt;
</code></pre>

<p>or</p>

<pre><code>&lt;link href="/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet"&gt;
</code></pre>

CC BY-SA 3.0
2014-09-13T15:27:01.720Z
Unrelated, but in your sample.html, wouldn't all those conditionals in the robots block work with one `<meta name="robots" content="{{ entry.metaRobotsIndex }}">`?
AbbeyDesign
CC BY-SA 3.0
2014-09-14T03:14:14.930Z
I would love to do that, but it can have more than one option selected (and often will), e.g., "noarchive" and "nofollow". Is there a better way to do that? (I thought about {% switch %} but it's not much better.)
Lora at Two Sigma
CC BY-SA 3.0
2014-09-14T03:37:49.707Z
I can insert multiple values into one tag, but then I run into a comma problem. Is there a reference for how to remove the last comma that you know of?
Lora at Two Sigma
CC BY-SA 3.0
2014-09-14T03:58:00.277Z
What kind of field is {{ metaRobotsIndex }}?
AbbeyDesign
CC BY-SA 3.0
2014-09-14T03:58:19.117Z
{% block robots %}
    {% for option in entry.metaRobotsIndex %}
    {{ option }}{% if not loop.last %}, {% endif %}
    {% endfor %}
    {% endblock robots %}
Lora at Two Sigma
CC BY-SA 3.0
2014-09-14T04:04:01.820Z
Yes, that is what I would do.
AbbeyDesign
CC BY-SA 3.0
2014-09-14T04:07:55.593Z
It's a checkbox. Yes, thanks to your suggestion, Craft's documentation, and a great recipe at [link](http://http://craftcookbook.net/recipes/302) titled "Remove elements from the last iteration a loop," it worked beautifully.

Thanks, @AbbeyDesign.
Lora at Two Sigma
CC BY-SA 3.0
2014-09-13T14:59:27.763Z
2014-09-13T15:07:07.447Z
2014-09-13T15:07:07.447Z
AbbeyDesign
<p>I am a complete novice.</p>

<p>Live Preview does not seem to be accessing the stylesheets, which are called in my _skeleton.html. My template is sample.html. I am live, not in dev environment,in case that matters. And this is a single, not channel or structure.</p>

<p>I have read the other questions/answers about this topic, but I haven't made changes to any code/php files, and I don't have any variables named "entry."</p>

<p>Here are my templates.</p>

<p>First, _skeleton.html.</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" {% block language %}{% endblock language %}&gt;
  &lt;head prefix="og: http://ogp.me/ns#"&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    {% block robots %}{% endblock robots %}
    &lt;title&gt;{% block title %}{% endblock title %}&lt;/title&gt;
    &lt;link rel="home" href="{{ siteUrl }}" /&gt;
    &lt;meta name="description" {% block description %}{% endblock description %}&gt;
    &lt;!-- Typekit --&gt;
    &lt;script type="text/javascript" src="//use.typekit.net/xxx7vby.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;try{Typekit.load();}catch(e){}&lt;/script&gt;
    &lt;!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --&gt;
    &lt;!--[if lt IE 9]&gt;
      &lt;script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"&gt;&lt;/script&gt;
    &lt;![endif]--&gt;
    &lt;link rel="canonical" {% block canonicalURL %}{% endblock canonicalURL %} /&gt;
    &lt;link rel="icon" href="assets/images/favicon.ico"&gt;
    &lt;!-- Bootstrap core CSS --&gt;
    &lt;link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet"&gt;
    &lt;!-- Custom styles for this template --&gt;
    &lt;link rel="stylesheet" href="assets/css/to-do.css"&gt;
    &lt;!--http://ogp.me/--&gt;
    &lt;meta property="og:title" {% block ogTitle %}{% endblock ogTitle %}&gt;
    &lt;meta property="og:type" content="website" /&gt;
    &lt;meta property="og:url" {% block ogURL %}{% endblock ogURL %} /&gt;
    &lt;!-- &lt;meta property="og:image" content="http://delectabl.es/assets/images/delectables-logo.png"&gt;
    &lt;meta property="og:image:type" content="image/png"&gt;
    &lt;meta property="og:image:width" content="???"&gt;
    &lt;meta property="og:image:height" content="???"&gt; --&gt;
    &lt;meta property="og:description" {% block ogDescription %}{% endblock ogDescription %}&gt;
    &lt;meta property="og:locale" {% block locale %}{% endblock locale %}&gt;
    &lt;meta property="og:site_name" content="{{ siteName }}"&gt;
    &lt;!--&lt;meta prefix="fb: http://ogp.me/ns/fb#" property="fb:app_id" content="???????????????"&gt; --&gt;
  &lt;/head&gt;
  &lt;body&gt;
{% block contents %}{% endblock contents %}
{% include "includes/include-footer" %}
{% include "includes/include-bootstrap-core-javascript" %}
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Then, sample.html:</p>

<pre><code>{% extends "_layout" %}

{% block language %}
lang="{{ entry.languageLocale }}"
{% endblock language %}

{% block robots %}
{% if entry.metaRobotsIndex.contains('index') %}
&lt;meta name="robots" content="index"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('noindex') %}
&lt;meta name="robots" content="noindex"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('noimageindex') %}
&lt;meta name="robots" content="noimageindex"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('none') %}
&lt;meta name="robots" content="none"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('follow') %}
&lt;meta name="robots" content="index"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('nofollow') %}
&lt;meta name="robots" content="nofollow"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('noarchive') %}
&lt;meta name="robots" content="noarchive"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('nocache') %}
&lt;meta name="robots" content="nocache"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('nosnippet') %}
&lt;meta name="robots" content="nosnippet"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('noodp') %}
&lt;meta name="robots" content="noodp"&gt;
{% endif %}
{% if entry.metaRobotsIndex.contains('noydir') %}
&lt;meta name="robots" content="noydir"&gt;
{% endif %}
{% endblock robots %}

{% block title %}
{{ siteName }}: {{ entry.title }}
{% endblock title %}

{% block description %}
content="{{ entry.metaDescription }}"
{% endblock description %}

{% block canonicalURL %}
href="{{ entry.url }}"
{% endblock canonicalURL %}

{% block ogTitle %}
content="{{ siteName }}: {{ entry.title }}"
{% endblock ogTitle %}

{% block ogURL %}
content="{{ entry.url }}"
{% endblock ogURL %}

{% block ogDescription %}
content="{{ entry.metaDescription }}"
{% endblock ogDescription %}

{% block locale %}
content="{{ entry.languageLocale }}"
{% endblock locale %}

{% block contents %}
    &lt;div class="container-fluid"&gt;
      &lt;div class="row"&gt;
        &lt;div class="col-xs-10 col-xs-offset-1"&gt;
          &lt;article&gt;
            &lt;header&gt;
              &lt;h1&gt;{{ entry.heading }}&lt;/h1&gt;
            &lt;/header&gt;
            &lt;div&gt;
              {{ entry.body }}
            &lt;/div&gt;
          &lt;/article&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
{% endblock contents %}
</code></pre>

<p>The page is live (ignore the ugly styling). You can see it at delectabl.es/sample.</p>

<p>On Live Preview it looks like this:</p>

<p><img src="https://i.sstatic.net/nYtnl.jpg" alt="enter image description here"></p>

<p>What am I missing?</p>

<p>Thank you.</p>

<p>Lora at Two Sigma</p>

CC BY-SA 3.0
2014-09-13T14:56:06.000Z
Unless the {{ entry.whatEver }} counts as a variable named "entry."
Lora at Two Sigma
CC BY-SA 3.0
2014-09-14T03:29:03.857Z
@AbbeyDesign, thank you. It worked. I'm a bit confused, though, because the address works live without the "{{ siteUrl }}/" (because the starting point is the root, right?, I think). Presumably because craft/templates/ is above the root. Don't really understand why it would work both ways live and only one way in the Live Preview. Even so, at least I know what I need to do. Thank you so much.
Lora at Two Sigma
<live-preview>
Live Preview has No Style
# Live Preview has No Style

(Asked by: username_0 on 2014-09-13)

I am a complete novice.
Live Preview does not seem to be accessing the stylesheets, which are called in my _skeleton.html. My template is sample.html. I am live, not in dev environment,in case that matters. And this is a single, not channel or structure.
I have read the other questions/answers about this topic, but I haven't made changes to any code/php files, and I don't have any variables named "entry."
Here are my templates.
First, _skeleton.html.


  
    
    
    
    {% block robots %}{% endblock robots %}
    {% block title %}{% endblock title %}
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  
  
{% block contents %}{% endblock contents %}
{% include "includes/include-footer" %}
{% include "includes/include-bootstrap-core-javascript" %}
  


Then, sample.html:
{% extends "_layout" %}

{% block language %}
lang="{{ entry.languageLocale }}"
{% endblock language %}

{% block robots %}
{% if entry.metaRobotsIndex.contains('index') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('noindex') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('noimageindex') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('none') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('follow') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('nofollow') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('noarchive') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('nocache') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('nosnippet') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('noodp') %}

{% endif %}
{% if entry.metaRobotsIndex.contains('noydir') %}

{% endif %}
{% endblock robots %}

{% block title %}
{{ siteName }}: {{ entry.title }}
{% endblock title %}

{% block description %}
content="{{ entry.metaDescription }}"
{% endblock description %}

{% block canonicalURL %}
href="{{ entry.url }}"
{% endblock canonicalURL %}

{% block ogTitle %}
content="{{ siteName }}: {{ entry.title }}"
{% endblock ogTitle %}

{% block ogURL %}
content="{{ entry.url }}"
{% endblock ogURL %}

{% block ogDescription %}
content="{{ entry.metaDescription }}"
{% endblock ogDescription %}

{% block locale %}
content="{{ entry.languageLocale }}"
{% endblock locale %}

{% block contents %}
    
      
        
          
            
              {{ entry.heading }}
            
            
              {{ entry.body }}
            
          
        
      
    
{% endblock contents %}

The page is live (ignore the ugly styling). You can see it at delectabl.es/sample.
On Live Preview it looks like this:

What am I missing?
Thank you.
username_0

**Tags:** live-preview

> **Comments:**
> **username_0**: Unless the {{ entry.whatEver }} counts as a variable named "entry."  
> **username_0**: @username_1, thank you. It worked. I'm a bit confused, though, because the address works live without the "{{ siteUrl }}/" (because the starting point is the root, right?, I think). Presumably because craft/templates/ is above the root. Don't really understand why it would work both ways live and only one way in the Live Preview. Even so, at least I know what I need to do. Thank you so much.  

---

## 1 answers

### Answer by username_1 on 2014-09-13. Score: 7 | Accepted answer

Not sure what your end url is but I think you'll need either a "/" or {{ siteUrl }} before "assets" in "assets/bootstrap/css/bootstrap.min.css".
so (for all references to css etc.)


or

> **Comments:**
> **username_1**: Unrelated, but in your sample.html, wouldn't all those conditionals in the robots block work with one `<meta name="robots" content="{{ entry.metaRobotsIndex }}">`?  
> **username_0**: I would love to do that, but it can have more than one option selected (and often will), e.g., "noarchive" and "nofollow". Is there a better way to do that? (I thought about {% switch %} but it's not much better.)  
> **username_0**: I can insert multiple values into one tag, but then I run into a comma problem. Is there a reference for how to remove the last comma that you know of?  
> **username_1**: What kind of field is {{ metaRobotsIndex }}?  
> **username_0**: {% block robots %}     {% for option in entry.metaRobotsIndex %}     {{ option }}{% if not loop.last %}, {% endif %}     {% endfor %}     {% endblock robots %}  
> **username_1**: Yes, that is what I would do.  
> **username_0**: It's a checkbox. Yes, thanks to your suggestion, Craft's documentation, and a great recipe at [link](http://http://craftcookbook.net/recipes/302) titled "Remove elements from the last iteration a loop," it worked beautifully.  Thanks, @username_1.  

---

