Logo of SermonSpeaker Extension Claim

Login Form

Layouting help

More
3 years 10 months ago #4708 by rowan
Replied by rowan on topic Layouting help
Hi Thomas,

Just thought I'd flick you an image of what I'm working on so see attached.

At the moment I'm including a css file within my layout eg I now have a tableflat.php, a tableFlat.xml and a tableFlat.css . Do you have any better suggestions as to how this could be done? I guess theoretically given that the css is relatively minimal I could do it inline? But you're the developer so I thought I'd ask you :)

Anyway this is becoming quite fun!

Cheers
Rowan

PS I might also try to work on some module layouts for the latest sermons module when I get the time.

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

More
3 years 10 months ago - 3 years 10 months ago #4710 by Thomas Hunziker
Replied by Thomas Hunziker on topic Layouting help
You forgot the attachement :)

I wouldn't use inline CSS. I would put the CSS file into a subdirectory of the /media folder and load it in your layout using
JHtml::stylesheet('your_subfolder/file.css', '', true);
For example you could put it into /media/sermonspeakerlayout/css/tableFlat.css and load it using
JHtml::stylesheet('sermonspeakerlayout/tableFlat.css', '', true);

This has several advantages: First your file will be cached by the browser and only loaded once, reducing the bandwith needed to load your page.
Second it allows to override the file in a template if someone else wants to use your layout.

Have a look how I do it with the example layouts. The manifest puts the file into the media folder here: github.com/Bakual/SermonSpeaker/blob/mas...lumns-layout.xml#L25
And it's loaded in the layout here: github.com/Bakual/SermonSpeaker/blob/mas...tmpl/columns.php#L15

Feel free to rate SermonSpeaker on JED .
Useful documentation for beginners: First Steps & FAQ
How to say "Thank You!": Contribute or support using the Donate button at the bottom of each page.
Last edit: 3 years 10 months ago by Thomas Hunziker.

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

More
3 years 10 months ago #4713 by rowan
Replied by rowan on topic Layouting help
Yeah the attachment thing went a bit haywire, something stupid I did on my end!

Thanks for the tips re the stylesheet, I'll give that a whirl.

Cheers

Attachments:

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

More
3 years 10 months ago #4715 by Thomas Hunziker
Replied by Thomas Hunziker on topic Layouting help
Looks nice indeed!

Feel free to rate SermonSpeaker on JED .
Useful documentation for beginners: First Steps & FAQ
How to say "Thank You!": Contribute or support using the Donate button at the bottom of each page.

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

Time to create page: 0.252 seconds
Powered by Kunena Forum