This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

tomdoodle
tomdoodle

Hi, I'm new to October CMS but I got a whole blog running within a few hours. Amazing! The only thing, where I'm stuck with is adding the CSS file of the plugin "Social Sharing Buttons" from Martin. I added successfully the component to the page (url /blog/post/:slug), inserted the code {% component 'ssbuttonsssb' %} and then tried to add the CSS file to different locations - the default.htm of the layout, in meta.htm in partials and some other locations, where I thought it might fit (of course not every location at the same time ... :). None of them helped. This code was inserted:

function onStart () {
    $this->addCss('/plugins/martin/ssbuttons/assets/css/social-sharing-ssb.css');
}

Any hints or tips what I could try else? Thanks, Thomas

alxy
alxy

The component registers its own assets. Just make sure to put {% styles %} somewhere in your layout, preferably in the head section of course ;)

tomdoodle
tomdoodle

Hi, thanks for the quick answer. {% styles %} is actually in meta.htm included ... so I'm still wondering, that the plugin css does not appear there.

Regards, Thomas

<meta charset="utf-8">
<title>{{ this.page.title }} - {{ this.theme.site_name }}</title>
<meta name="description" content="{{ this.page.meta_description }}">
<meta name="title" content="{{ this.page.meta_title }}">
<meta name="author" content="OctoberCMS">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="OctoberCMS">
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Oswald:400,700" rel="stylesheet"> 
<link href="{{ [
    '@framework.extras',
     'assets/less/vendor.less'
]|theme }}" rel="stylesheet">
<link href="{{ ['assets/less/theme.less']|theme }}" rel="stylesheet">
{% styles %}

Last updated

alxy
alxy

Can you check the source code of your page and see what happens there? Do you see a link being generated that references the css file?

tomdoodle
tomdoodle

Hi Alex,

I have to apologize myself, for some reason I've overseen that the CSS-file is loaded. It just does not help, the CSS is useless, the icons are not in horizontal order.

Sorry again for my confusion, October CMS is still new to me, but I'm in love with it.

Regards, Thomas

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.