Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

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

Thanks,
Geoff

Please Log in or Create an account to join the conversation.

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

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
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 following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
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

Please Log in or Create an account to join the conversation.

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

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

docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core

I haven't tried it with my Cook component yet though!

Please Log in or Create an account to join the conversation.

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

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

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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 following user(s) said Thank You: edwardcox

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.064 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started