8 years ago
Topic

Hello.

I'm new to seblod but i can still know enough of development with bootstrap or css and development.

I want to buid my own template for seblod but i found no tuts for doing that.

I only found position overrides tutorial but i want to know what is the "prefeared" way to link bootstrap, skeleton or any other framework inside the theme.

Thsanks in advance.

Get a Book for SEBLOD
1283 Posts
Bucklash
8 years ago
2
Level 1

Hi,

Your Main Joomla template would load the Bootstrap stuff wouldn't it?

For my custom Joomla template I did this:

// Add JavaScript Frameworks
// JHtml::_('bootstrap.framework');
unset($this->_scripts[JURI::root(true).'/media/jui/js/bootstrap.js']); // stop Joomla loading bs2.js
unset($this->_scripts[JURI::root(true).'/media/jui/js/bootstrap.min.js']); // stop Joomla loading bs2.js
unset($doc->_scripts[$this->baseurl.'/media/jui/js/bootstrap.min.js']);
unset($this->_scripts[JURI::root(true).'/media/system/js/modal.js']); // stop Joomla loading bs2 modal.js
unset($this->_style[JURI::root(true).'/media/system/css/modal.css']); // stop Joomla loading bs2 modal.css
$doc->addScript('templates/' .$this->template. '/js/bootstrap.min.js');
$doc->addScript('templates/' .$this->template. '/js/headroom.js');
$doc->addScript('templates/' .$this->template. '/js/multiselect-bs3.js');
$doc->addScript('templates/' .$this->template. '/js/template.js');
// Add Stylesheets
$doc->addStyleSheet('templates/'.$this->template.'/css/template.css');
<br>

I stopped Joomla! from loading the Bootstrap 2 stuff, and load Bootstrap 3 stuff and other bits instead.

NOTE: If using Seblod to output forms and lists etc all is good, however, if you use something like Featured Articles, then Joomla will STILL load some BS2 stuff. My modals wouldn't work.
4229 Posts
Kadministrator
8 years ago
1
Level 2

Instead of using unset, you can simply add overrides to /js, /js/jui and /css directories in your template, joomla will then use your version instead default one.

1283 Posts
Bucklash
8 years ago
0
Level 3

Hi Klas

Thanks, disn't know that :)

8 years ago
3
Level 1

I dont think that i made myself clear.

My problem is not to use bootstrap or other css frameworks in joomla templates but inside seblod templates instead.

I suppose that my problem will be solved by using framework classes in the seblod templates to include template positions but i needed a more official answer on how to do it.

The unset command you use above can be done simply by commenting or deleting these code lines that connect the joomla template with the directory of the bootstrap framework.

Thanks again

4229 Posts
Kadministrator
8 years ago
2
Level 2

Easiest way to do this is to create position override for your seblod template and call necessary files from there. Other option is to use php beforereder plugin from code pack and do echo "your html here";

8 years ago
1
Level 3

So using col-md-4 or other bs classes and inside them the seblod template php's will do the work?

Thanks in advance.

4229 Posts
Kadministrator
8 years ago
0
Level 4

Hi,

I don't really understand what you are trying to do.

8 years ago
1
Level 1

I want to use and display classes of bs or uikit or foundation inside seblod template.

So lets say that i want to display a position or position field pulled right then i can use pull-right class of bootstrap

1283 Posts
Bucklash
8 years ago
0
Level 2

Hi

So

you are not wanting to load the framework via joomla template.

You want to only load the framework via seblod?


Why can't you load the files via beforerender as Klas mentioned?

8 years ago
1
Level 1

I think that maybe im not asking the correct question here and my comments are confusing?

Sorry, lets try again:

Since the joomla template is linked with stylesheets, these stylesheets can be used inside seblod templates also without linking seblod templates with these stylesheets?

So, overriding a position can be used inside bootstrap divs just like joomla template positions?

1283 Posts
Bucklash
8 years ago
0
Level 2

Hi

Yes

Seblod stuff will render in the content position or a module position of a Joomla template so all will apply. Same with position overrides

Get a Book for SEBLOD