how to customize a single page

flag-redI would like to customize my music page and make it different from my index page.different background,logo ect. but they all use the same style sheet is there a code i can add and where should i add this code to tell my music page it is independent from others

Quote · 23 Jul 2009

And as I promised in your blog post, here is the answer:

 

Your site will call the music page as follows:

 

browsemusic.php as the main page, to build this page it needs to call on a few other pages.  Note, this is not all inclusive, but it will show you how you can customize the page.  The list of items it will call is as follows:

 

page_82.html

templates/base/general.css

templates/base/css/music.css

templates/tmpl_{tmpl}/css/general.css

 

and

 

templates/tmpl_{tmpl}/css/music.css

 

Note the last item I listed, this is the most important.

 

the base/css/general.css and tmpl_{tmpl}/css/general.css are default files, the browser uses these when it can not find the code for a specific item in the pagespecific.css file for it.  In your case, the music.css file

 

Your site will also call from the page_82.html file the _header.html & the _footer.html files, let's look at those first as they are first step in custominzing your site:

 

_header.html will call a specific file for the header and order that code to be used in your site, so how do you change this?  Seriously, how do you get a new header on one page and not the rest?

 

Look at the code for page_82.html

 

at templates/tmpl_{uni}/page_82.html we find the following:

 

We have no page_82.html currently in the file.  So this means we are free to create one and lay it out as we see fit.  The easiest way to do this, grab the code from page_81.html, copy it to your computer, rename it page_82.html and begin to work with it.  Let's do that:

 

The code we start with is:

 

__include _header.html__

 __page_main_code__

__include _footer.html__

 

Not alot to work with there, but then again it's a ton.  So rename the file and do the following:

 

Change to:

 

 

__include _header2.html__

 __page_main_code__

__include _footer2.html__

 

 

Now, you will need to go create 2 new files, templates/tmpl_{tmpl}/_header2.html & _footer2.html Use your imagination and standard html coding for these, also follow what is in the current _header.html & _footer.html files to help you out with calling logos, menus and such to the new page. 

 

Moving forward, we see in the page.php file it calls this:

 

$_page['css_name'] = $oNew->sCssName;

 

Note, it's not calling a specific css file as the final authority which means it's deferring to the general.css files for all the page code.  That's okay, we can work with this.

 

Create a new file and name it music.css and fill it with all the code from the templates/tmpl_{tmpl}/css/general.css file.  This will cause it to layout exactly as the general.css file tells it to.  But why?  Because we're going to alter all that code to get your layout as you want it without having to handwrite it all one by one.

 

Now, change the line I have above from $_page['css_name'] = $oNew->sCssName; to:

 

 $_page['css_name'] = $music->sCssName

 

This will tell your browseMusic.php page to call the music.css file in the base & tmpl css folders. 

 

Alrights, are you with me still?  I hope so, because this is going to get fun now. 

 

Load your browseMusic.php page up in the Firefox browser and use Firebug, this way you can see your changes and find them all.  Start toying with the colors by changing them in your new templates/tmpl_{tmpl}/css/music.css file, do not adjust the general.css file.  Pay attention to the header of each section such as:

 

.page_column_first .dsign_box_last and so on.  I just made something up there, but you get the point, you can incorporate different items to achieve different results and so on.  By adjusting those 2 lines, 1 in browseMusic.php and the other in the page_82.html you can send the site to different locations for these specific pages and have a blast with how the pages will resolve.  You can do this for every single page on your site and make them all appear substantially different, not just backgrounds,  but every facet of the page.

 

Have fun and enjoy, I know the instructions are kind of choppy, but I'm sure you get it and I'm also sure others will hop in here with more useful tips on this.  It's a great item to play with and for those who know the coding/understand it will definitely set your site apart from others.

Quote · 23 Jul 2009

Thank You Very much this is excatly what i need i appreciate the time you have taken to answer this for me and i will get to  work right away Ty....

Quote · 23 Jul 2009

i made all the changes but the browse music php is still using the general css. for instruction on layout

when using firebug i can c that there is a link  

<meta http-equiv="Content-Style-Type" content="text/css" />
	<link href="templates/tmpl_uni/css/general.css" rel="stylesheet" type="text/css" />
	<link href="templates/tmpl_uni/css/anchor.css" rel="stylesheet" type="text/css" />
	

which is telling it to use the general.css where would i go to changes this to  redirect it to  new music css ive created

Quote · 23 Jul 2009

Okay, I know this is close.  First, try clearing out the browser and server caches, let's make sure that it's not just serving up the pages from there before we dig in further. 

 

I'm going to throw something on the test server tonight if that doesn't work and try to have it for you by morning.  Sorry, but the plate is full at the moment.

Quote · 23 Jul 2009

cool

Quote · 23 Jul 2009

well Ive tried deleting cach but dnt think that was the problem any other ideas anyone!!Cry 

i still belive problem is with link if i could find that link then i could redirected it

Quote · 24 Jul 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.