Welcome, Guest
Username: Password: Remember me

TOPIC: Page Layout - blocks?

Page Layout - blocks? 02 May 2012 05:26 #2211

  • geoffr
  • geoffr's Avatar
  • Offline
  • Senior Member
  • Posts: 68
  • Thank you received: 2
  • Karma: 0
Is there a way to add a horizontal line, or put borders around areas of a page or form?

Thanks,
Geoff
The administrator has disabled public write access.

Re: Page Layout - blocks? 02 May 2012 06:31 #2212

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
Not within Cook but it is easy to change the layout using css and html by editing.

Look in /components/com_xxx/views/xxx/tmpl and you will see the layout in the .php file.

Warning: If you reinstall from Cook these changes will be overwritten so it might be an idea to make a copy of your edited file so that you can quickly re-apply the changes.
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Re: Page Layout - blocks? 02 May 2012 08:55 #2215

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
For my part, i copied the original css from cook into my own template, then all i do when i reinstall the component is i replace all the css code in the css files in the component with
@import url("http://www.mydomain.pro/templates/atomic/css/mycomponent.css");
And this code is my snipnet code list in dreamweaver, so it's quick and easy
The administrator has disabled public write access.

Re: Page Layout - blocks? 02 May 2012 10:02 #2218

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
Another way to preserve styling might be to use the template override facility built in to Joomla:

http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

I haven't tried it with my Cook component yet though!
The administrator has disabled public write access.

Re: Page Layout - blocks? 02 May 2012 10:13 #2219

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
It works (already done it for another client), but i don't think template overrides work for css... Maybe i'm wrong though
The administrator has disabled public write access.

Re: Page Layout - blocks? 02 May 2012 10:27 #2220

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Of course, all component Joomla native facilities are working.
Templating each different templates files of each different views is possible in your main website template files.

For css, it depends how you implement them in your template, the right use is to load is :

$doc = JFactory::getDocument();
$doc->addStyleSheet('myCSSUrlFile.css');

see how in helpers/helper.php
function headerDeclarations()
{

//CLEANED TO MAKE IT EASIER ...  (not your original function)

	$doc = JFactory::getDocument();

	//Javascript
	$doc->addScript(MY_SCRIPT_URL);

	//CSS
	$doc->addStyleSheet('MY_CSS_URL');
...


}

This is how your component files are loaded in the header.

You should do the same in your template.

If it not working, I should have a look, but it depends the order Joomla does.

The component is loaded before the template, so it should works !!
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: edwardcox
Time to create page: 0.092 seconds

Get Started