Page 1 of 2

New Site http://www.mosaic-construction.co.uk

Posted: Sat Apr 10, 2010 2:15 pm
by applejack
One more site. Hope you like it.

http://www.mosaic-construction.co.uk

CMSMS 1.6.7
Gallery Module

Re: New Site http://www.mosaic-construction.co.uk

Posted: Tue Apr 27, 2010 4:28 pm
by mjrumble
Nice site I like the look and feel.

Re: New Site http://www.mosaic-construction.co.uk

Posted: Tue Apr 27, 2010 7:46 pm
by Dr.CSS

Re: New Site http://www.mosaic-construction.co.uk

Posted: Wed Apr 28, 2010 2:39 pm
by applejack
Thanks DR CSS I had forgotten to check it again after the htpasswd was removed. All validated now.

Re: New Site http://www.mosaic-construction.co.uk

Posted: Mon May 03, 2010 3:56 am
by dvdljns
Are you ofering that as a download. I do not mind puting info explaining who did it and a link.

Re: New Site http://www.mosaic-construction.co.uk

Posted: Mon May 03, 2010 10:30 am
by applejack
If you mean the site as a theme then no that is not possible as this is a commercial project and the copyright is owned by the client.

Re: New Site http://www.mosaic-construction.co.uk

Posted: Tue Oct 05, 2010 8:54 pm
by simon.romin
Nice site!

Do you mind sharing your custom code for displaying a different header image for different categories?

I have been trying to achieve something similar.

Good work anyway, very professional website.

Re: New Site http://www.mosaic-construction.co.uk

Posted: Tue Oct 05, 2010 10:56 pm
by Peciura
Lovely :)

Re: New Site http://www.mosaic-construction.co.uk

Posted: Wed Oct 06, 2010 9:34 am
by Pedrosken
simon.romin wrote: Nice site!

Do you mind sharing your custom code for displaying a different header image for different categories?

I have been trying to achieve something similar.

Good work anyway, very professional website.
Very simple;
add extra attribute (file) to your pages, and for each page add the picture you want.
Then adjust your template and insert this picture url in a style definition.

Code: Select all

<style type="text/css">
#main-photo {

    background:transparent url(/uploads/images/site/p-contact.jpg) top left no-repeat;

}
</style>

Re: New Site http://www.mosaic-construction.co.uk

Posted: Wed Oct 06, 2010 9:46 am
by applejack
The way to add the picture for each section is to use {$page_alias} so using a naming convention for the images i.e. p-services.jpg, p-contact.jpg etc based upon the alias / URL of the page where you want the image to be shown, then in your code you can use etc etc. Obviously you can use the same method in a background image. You can also use this for multiple images and other elements on a page.

For all newbies I would strongly recommend learning Smarty as there are lots of powerful things which it can do and it is very easy to learn and implement. I would also advise using the CGSimpleSmarty module as there are lots of ways this can be used in a site to manipulate what content is shown based upon where a user is in a site.

Re: New Site http://www.mosaic-construction.co.uk

Posted: Thu Oct 07, 2010 9:06 pm
by simon.romin
Hi applejack,

Thanks for the answer!

Are you aware of a way to change the header background image for each category, without changing the page templates?

Cheers,

Simon

Re: New Site http://www.mosaic-construction.co.uk

Posted: Fri Oct 08, 2010 10:23 am
by applejack
If you mean by category the top level sections of a site then use CGISimpleSmarty i.e.

{$cgsimple->get_root_alias($page_alias)}

Re: New Site http://www.mosaic-construction.co.uk

Posted: Fri Oct 08, 2010 9:50 pm
by sara_criss
Really nice site.
Graphics is awsome.

Re: New Site http://www.mosaic-construction.co.uk

Posted: Mon Oct 11, 2010 7:50 pm
by simon.romin
applejack wrote: If you mean by category the top level sections of a site then use CGISimpleSmarty i.e.

{$cgsimple->get_root_alias($page_alias)}
Thanks for your reply - very useful.

So using this piece of custom coding, I upload an image to my Uploads directory with the same name as my Category (top level sections)?

And this will display a different header image for each Category?

Simon

Re: New Site http://www.mosaic-construction.co.uk

Posted: Mon Oct 11, 2010 8:13 pm
by applejack
Re: So using this piece of custom coding, I upload an image to my Uploads directory with the same name as my Category (top level sections)?

Yes. e.g. if you have a top level section who's URL / page alias is services just name you file i.e. p-services.jpg and in you template code just use get_root_alias($page_alias)}.jpg" alt="" />

For a css background image you have to put the code in the head and beneath any external css file reference.

Code: Select all

<style type="text/css">
{literal}
#main-photo {
{/literal}
    background:transparent url(/uploads/images/p-{$cgsimple->get_root_alias($page_alias)}.jpg) no-repeat;
{literal}
}
{/literal}
</style>