New Site http://www.mosaic-construction.co.uk
Re: New Site http://www.mosaic-construction.co.uk
Nice site I like the look and feel.
Re: New Site http://www.mosaic-construction.co.uk
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
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
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.
-
- Forum Members
- Posts: 65
- Joined: Tue Jul 13, 2010 9:31 am
Re: New Site http://www.mosaic-construction.co.uk
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.
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
Very simple;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.
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
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.
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.
-
- Forum Members
- Posts: 65
- Joined: Tue Jul 13, 2010 9:31 am
Re: New Site http://www.mosaic-construction.co.uk
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
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
If you mean by category the top level sections of a site then use CGISimpleSmarty i.e.
{$cgsimple->get_root_alias($page_alias)}
{$cgsimple->get_root_alias($page_alias)}
-
- New Member
- Posts: 8
- Joined: Tue Oct 21, 2008 2:05 pm
Re: New Site http://www.mosaic-construction.co.uk
Really nice site.
Graphics is awsome.
Graphics is awsome.
-
- Forum Members
- Posts: 65
- Joined: Tue Jul 13, 2010 9:31 am
Re: New Site http://www.mosaic-construction.co.uk
Thanks for your reply - very useful.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)}
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
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.
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>
Last edited by applejack on Mon Oct 11, 2010 8:18 pm, edited 1 time in total.