Page Class Suffix in template code
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Page Class Suffix in template code
I was wondering if anyone knows how to insert the page class suffix call in the templates themselves. The command for the page class suffix in the content doesn't work here as I assume another command needs to be taken place.
I tried to create my own function to call it but it resulted in a conflict with Joomlas DB code
So, do you know how to call the page class suffix into the template code?
I tried to create my own function to call it but it resulted in a conflict with Joomlas DB code
So, do you know how to call the page class suffix into the template code?
- jlabs
- Joomla! Enthusiast
- Posts: 220
- Joined: Thu Aug 18, 2005 1:54 pm
- Location: FL USA
- Contact:
Re: Page Class Suffix in template code
Hi
Take a look at this article.
http://www.m65.net/article-chapter-page ... 5.html#1_1
I don't think you need to hardcode the CSS to the template itself.
But just bad suffixes to the existing classes have different views on pages.
Hope this helps
Take a look at this article.
http://www.m65.net/article-chapter-page ... 5.html#1_1
I don't think you need to hardcode the CSS to the template itself.
But just bad suffixes to the existing classes have different views on pages.
Hope this helps
Joomla Template Kit
http://dumbitdown.com
http://dumbitdown.com
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
Hey,
Thanks for the reply but that is not what I was referring to. I know how to use and style a page class suffix, I even wrote a tutorial on it ( http://tutorials.rockettheme.com/joomla ... uffix.html )
The way the page class suffix works is by adding the user determined text to the .contentpane part of the HTML structure. This is all regulated by Joomla. I was wanting to have the PHP code that I can manually inject it into the template. Its quite a handy idea as I would apply it to the <BODY> tag of the template, that means the page class suffix would help you control EVERYTHING on the page.
Currently, you can only style the tables that Joomla injects as part of the content items, if the suffix was applied to the body tag, it would allow you to control every inch of the template.
Thanks for the reply but that is not what I was referring to. I know how to use and style a page class suffix, I even wrote a tutorial on it ( http://tutorials.rockettheme.com/joomla ... uffix.html )
The way the page class suffix works is by adding the user determined text to the .contentpane part of the HTML structure. This is all regulated by Joomla. I was wanting to have the PHP code that I can manually inject it into the template. Its quite a handy idea as I would apply it to the <BODY> tag of the template, that means the page class suffix would help you control EVERYTHING on the page.
Currently, you can only style the tables that Joomla injects as part of the content items, if the suffix was applied to the body tag, it would allow you to control every inch of the template.
- jlabs
- Joomla! Enthusiast
- Posts: 220
- Joined: Thu Aug 18, 2005 1:54 pm
- Location: FL USA
- Contact:
Re: Page Class Suffix in template code
This would be tricky because Joomla using a param
for each part of the article layouts.
1. You would have use a template override.
or
2. Come up with your own php include file that's at the last line of the
head tag to override the default class's. Base on a cookie etc.
like what yootheme.com does is not that hard to do.
or
3. Content Plug-in
Code: Select all
MasterClassName<?php echo $this->item->params->get( 'pageclass_sfx' ); ?>
1. You would have use a template override.
or
2. Come up with your own php include file that's at the last line of the
head tag to override the default class's. Base on a cookie etc.
like what yootheme.com does is not that hard to do.
or
3. Content Plug-in
Joomla Template Kit
http://dumbitdown.com
http://dumbitdown.com
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
1. I wouldn't see how a template override would really help unless you were referring to overriding the Article layout and then inject some code so the page class suffix would be injected into the <head>?
2. The cookie based approach isn't difficult but is the opposite of where I wanted to be ending up. This would mean the controls would be template side instead of joomla side and I'd prefer it to be joomla side.
3. I am not aware of a plugin specifically for this purpose.
Note: this information isn't necessarily for me as I do not personally need this approach but is for other people that I help in Joomla. Having a system where any template can easily pick up the page class suffix on menu items would benefit quite a lot of people.
For myself, I'd just do some IF statements in the PHP and make it all external but workarounds are not my aim.
Thanks for your replies though
2. The cookie based approach isn't difficult but is the opposite of where I wanted to be ending up. This would mean the controls would be template side instead of joomla side and I'd prefer it to be joomla side.
3. I am not aware of a plugin specifically for this purpose.
Note: this information isn't necessarily for me as I do not personally need this approach but is for other people that I help in Joomla. Having a system where any template can easily pick up the page class suffix on menu items would benefit quite a lot of people.
For myself, I'd just do some IF statements in the PHP and make it all external but workarounds are not my aim.
Thanks for your replies though
- jlabs
- Joomla! Enthusiast
- Posts: 220
- Joined: Thu Aug 18, 2005 1:54 pm
- Location: FL USA
- Contact:
Re: Page Class Suffix in template code
This is kind of a crazy question/requests or whatever.
The Hook via the GUI is a set by the menu link parameters in accordance with the components XML metadata.
Which obviously needs an item ID to be able to render any type of Pagesuffix to an individual page
or really the component for what it looks like in the code.
this holds the clues
the trick is that every component has its meta data and parameter variables through the XML file.
So in order to pull this trick off you have to copy some of the code. The menu system understands it
even through third parties Extensions.
You'll have to force-feed the parameter value inside the database
or override as are stored inside of the #_menu Params Column.
Grabs and renders the template
look for this function render()
line 218
But you need I say more than this.
Somehow you have to go into the $mainframe etc.
I'm not a Joomla core developer.
Maybe one of them can best answer your question.
This seems a little over the top to me not to startup type of argument.
You need to add the links to the menu anyway.
You need to design the stylesheets with the page suffix anyway.
So why would you go to the trouble adding such a difficult add-on just to do something they could do in a few clicks.
But you can have to do with or without any type of extension like this?
Best of luck
The Hook via the GUI is a set by the menu link parameters in accordance with the components XML metadata.
Which obviously needs an item ID to be able to render any type of Pagesuffix to an individual page
or really the component for what it looks like in the code.
this holds the clues
Code: Select all
administrator\components\com_menus\models\item.php
So in order to pull this trick off you have to copy some of the code. The menu system understands it
even through third parties Extensions.
You'll have to force-feed the parameter value inside the database
or override as are stored inside of the #_menu Params Column.
Grabs and renders the template
Code: Select all
\libraries\joomla\document\html\html.php
line 218
But you need I say more than this.
Somehow you have to go into the $mainframe etc.
I'm not a Joomla core developer.
Maybe one of them can best answer your question.
This seems a little over the top to me not to startup type of argument.
You need to add the links to the menu anyway.
You need to design the stylesheets with the page suffix anyway.
So why would you go to the trouble adding such a difficult add-on just to do something they could do in a few clicks.
But you can have to do with or without any type of extension like this?
Best of luck
Joomla Template Kit
http://dumbitdown.com
http://dumbitdown.com
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
I had a feeling it would require some more extensive code additions, I will look into it a bit more and see if a I can write some PHP code to call it.
However, I will try to explain the purpose behind my request as to further your understanding into my head This is actually more beneficial than you might think. The whole adding extra IDs to the <BODY> tag is nothing new for template developers, as you stated the YOOtheme cookie thing. This allows you to make distinctions between different pages between Joomla so you can style them differently. A common one is the font size and style changer approach. For example, just take a look at the new RT template ( http://demo.rockettheme.com/jul08/ ) - notice that the menus all have different colours which are generated from an array that is called upon in the <BODY> tag. Therefore, you can have each menu page load a whole different style variant.
That is the approach that I want to discover. Quite a lot of people use the page class suffix but then discover how limited it is. It only applies to the Component area which is just one line in the template's index.php ( <jdoc:include type="component" /> ) therefore, its control is highly restrictive in what you might think. For example, from a query I was dealing with a few days ago related to ( http://demo.rockettheme.com/jun08 ) - he wanted to use a page class suffix so that the entire white area could be made black for that page, however, the white background is generated for <div id="mainbody"> which is around 10 hierarchical layers above what the page class suffix injects itself to. Obviously, the page class suffix wouldn't really work.
Therefore, another approach was recommend using some PHP IF statements such as
<?php if (JRequest::getVar('view') = 'wrapper') : ?>
#mainbody { background-color: #000 !important; }
<?php endif; ?>
And that would be placed in the <STYLE> tag area of the template. This is a workaround. However, if the page class suffix was injected into the body tag, this wouldn't have been necessary. You'll find that adding PHP code is more daunting to people than adding to CSS. It would just be an added benefit and making individual page customisations even easier. Obviously, there are a plethora of other approaches to take but this would add another option to the basket
Anyway, I'll see what I can do as I anticipate only you will be replying to this thread
However, I will try to explain the purpose behind my request as to further your understanding into my head This is actually more beneficial than you might think. The whole adding extra IDs to the <BODY> tag is nothing new for template developers, as you stated the YOOtheme cookie thing. This allows you to make distinctions between different pages between Joomla so you can style them differently. A common one is the font size and style changer approach. For example, just take a look at the new RT template ( http://demo.rockettheme.com/jul08/ ) - notice that the menus all have different colours which are generated from an array that is called upon in the <BODY> tag. Therefore, you can have each menu page load a whole different style variant.
That is the approach that I want to discover. Quite a lot of people use the page class suffix but then discover how limited it is. It only applies to the Component area which is just one line in the template's index.php ( <jdoc:include type="component" /> ) therefore, its control is highly restrictive in what you might think. For example, from a query I was dealing with a few days ago related to ( http://demo.rockettheme.com/jun08 ) - he wanted to use a page class suffix so that the entire white area could be made black for that page, however, the white background is generated for <div id="mainbody"> which is around 10 hierarchical layers above what the page class suffix injects itself to. Obviously, the page class suffix wouldn't really work.
Therefore, another approach was recommend using some PHP IF statements such as
<?php if (JRequest::getVar('view') = 'wrapper') : ?>
#mainbody { background-color: #000 !important; }
<?php endif; ?>
And that would be placed in the <STYLE> tag area of the template. This is a workaround. However, if the page class suffix was injected into the body tag, this wouldn't have been necessary. You'll find that adding PHP code is more daunting to people than adding to CSS. It would just be an added benefit and making individual page customisations even easier. Obviously, there are a plethora of other approaches to take but this would add another option to the basket
Anyway, I'll see what I can do as I anticipate only you will be replying to this thread
-
- Joomla! Fledgling
- Posts: 4
- Joined: Wed Jun 18, 2008 1:12 am
Re: Page Class Suffix in template code
Hi I found this code on another site which worked for me...
This goes directly above the <body> tag:
This goes within the <body class="">:
The problem I'm having is that I get the error "Fatal error: Call to a member function get() on a non-object on line 52" when I try to use certain feature like Search for example. Any ideas or help would be appreciated.
Thanks,
Barré
This goes directly above the <body> tag:
Code: Select all
<?php
$menus = &JSite::getMenu();
$menu = $menus->getActive();
if (is_object( $menu )) $params = new JParameter( $menu->params );
$pageclass = $params->get( 'pageclass_sfx' );
?>
Code: Select all
<?php echo $pageclass;?>
Thanks,
Barré
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
You my friend are awesome!
That's exactly what I needed. The error you are getting is probably related to an item which isn't linked within the menu system. I'll look into that later on to avoid that fatal error.
That's exactly what I needed. The error you are getting is probably related to an item which isn't linked within the menu system. I'll look into that later on to avoid that fatal error.
barreguillen wrote:Hi I found this code on another site which worked for me...
This goes directly above the <body> tag:This goes within the <body class="">:Code: Select all
<?php $menus = &JSite::getMenu(); $menu = $menus->getActive(); if (is_object( $menu )) $params = new JParameter( $menu->params ); $pageclass = $params->get( 'pageclass_sfx' ); ?>
The problem I'm having is that I get the error "Fatal error: Call to a member function get() on a non-object on line 52" when I try to use certain feature like Search for example. Any ideas or help would be appreciated.Code: Select all
<?php echo $pageclass;?>
Thanks,
Barré
-
- Joomla! Fledgling
- Posts: 4
- Joined: Wed Jun 18, 2008 1:12 am
Re: Page Class Suffix in template code
Great! I'm glad.
I forgot to clarify that the problem, line 52, is this line:
When I comment out the line, the problem goes away, but I also lose the pageclass feature in the <body> tag. Any help you could offer would be great. Thanks.
Barré
I forgot to clarify that the problem, line 52, is this line:
Code: Select all
$pageclass = $params->get( 'pageclass_sfx' );
Barré
- jlabs
- Joomla! Enthusiast
- Posts: 220
- Joined: Thu Aug 18, 2005 1:54 pm
- Location: FL USA
- Contact:
Re: Page Class Suffix in template code
I'm work on a free menu module and I did run into something for you.
add this to your Template and you will see the array Dump.
You need to be specific to which menu are working on when adding this code.
What you're calling is the entire array which is nested
add this to your Template and you will see the array Dump.
Code: Select all
<?php
echo '<pre>';
echo var_export(JSite::getMenu());
echo '</pre>';
?>
What you're calling is the entire array which is nested
Joomla Template Kit
http://dumbitdown.com
http://dumbitdown.com
-
- Joomla! Fledgling
- Posts: 4
- Joined: Wed Jun 18, 2008 1:12 am
Re: Page Class Suffix in template code
Thanks. This makes sense. But I'm not sure this will address the "Fatal error: Call to a member function get() on a non-object on line 52" issue that I'm having. Do you think they're related?
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
This code works for me and doesn't display any errors.
*This is my 3rd edit of this post with all the code lol *
Code: Select all
<?php
$menus = &JSite::getMenu();
$menu = $menus->getActive();
$pageclass = "";
if (is_object( $menu )) :
$params = new JParameter( $menu->params );
$pageclass = $params->get( 'pageclass_sfx' );
endif;
?>
</head>
<body class="<?php echo $pageclass; ?>">
Last edited by MuffinDCC on Thu Jul 17, 2008 7:14 pm, edited 1 time in total.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Wed Jun 18, 2008 1:12 am
Re: Page Class Suffix in template code
Great! This works. Thanks so much!
- jlabs
- Joomla! Enthusiast
- Posts: 220
- Joined: Thu Aug 18, 2005 1:54 pm
- Location: FL USA
- Contact:
Re: Page Class Suffix in template code
I have not had change to test it. but I'm glad you guys got it working.
Cheers
B
Cheers
B
Joomla Template Kit
http://dumbitdown.com
http://dumbitdown.com
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
I modified the code so it was a bit leaner, it was a bit ... long winded as I was testing it out. So, for anyone wanted to implement it, just follows these steps:-
1. Open your template's index.php file (located in /templates/*template-name*/)
2. Find the </head> tag in the index.php, should be near the top area of the template
3. Above this, insert
4. Find the <body> tag in the index.php, should be after the </head> tag infact. Depending on your template, it may have other variables in it such as my testing template (Firenzie) which has <body class="<?php echo $fontstyle; ?>">
5. Insert <?php echo $pageclass; ?> into the body tag. There are a few ways to do this depending on how the template is setup already. Some examples below:-
a. If the <body> tag is empty, add a class with the PHP code in step5 so it mimics the following:
b. If the <body> tag is empty, add an ID with the PHP code in step5 so it mimics the following:
c. If the <body> tag already has a class, add a space after the class name and insert the the PHP code in step5 so it mimics the following:
d. If the <body> tag already has a class, and you want to add this as an ID, create the ID in the <body> tag and insert the the PHP code in step5 so it mimics the following:
1. Open your template's index.php file (located in /templates/*template-name*/)
2. Find the </head> tag in the index.php, should be near the top area of the template
3. Above this, insert
Code: Select all
<?php
$menus = &JSite::getMenu();
$menu = $menus->getActive();
$pageclass = "";
if (is_object( $menu )) :
$params = new JParameter( $menu->params );
$pageclass = $params->get( 'pageclass_sfx' );
endif; ?>
5. Insert <?php echo $pageclass; ?> into the body tag. There are a few ways to do this depending on how the template is setup already. Some examples below:-
a. If the <body> tag is empty, add a class with the PHP code in step5 so it mimics the following:
Code: Select all
<body class="<?php echo $pageclass; ?>">
Code: Select all
<body id="<?php echo $pageclass; ?>">
Code: Select all
<body class="<?php echo $fontstyle; ?> <?php echo $pageclass; ?>">
Code: Select all
<body id="<?php echo $pageclass; ?>" class="<?php echo $fontstyle; ?>">
-
- Joomla! Apprentice
- Posts: 45
- Joined: Mon Jul 30, 2007 1:03 pm
Re: Page Class Suffix in template code
This is excellent.. although I've been trying to implement this code, but can't seem to get it to work..
I've inserted into the body tag as shown below.. although I'm not sure if it should be in the id or the class.. could you advise if this is correct?
I'm using RocketTheme's Hyperion 1.5 template, but want to have a different body background image (or colour) for each page that I link to from the mainmenu, and have been going round in circles trying to do it !
Once this code has been inserted, how do I then set up the css and the page class suffix to work.. eg. if I want a red body background on a particular page?
Cheers
I've inserted into the body tag as shown below.. although I'm not sure if it should be in the id or the class.. could you advise if this is correct?
Code: Select all
<body id="<?php echo $pageclass; ?> ff-<?php echo $fontfamily; ?>" class="<?php echo $tstyle; ?> <?php echo $fontstyle; ?>">
Once this code has been inserted, how do I then set up the css and the page class suffix to work.. eg. if I want a red body background on a particular page?
Cheers
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
I would use
Only have one ID, but multiple classes.
Code: Select all
<body id="ff-<?php echo $fontfamily; ?>" class="<?php echo $tstyle; ?> <?php echo $fontstyle; ?> <?php echo $pageclass; ?>">
-
- Joomla! Apprentice
- Posts: 45
- Joined: Mon Jul 30, 2007 1:03 pm
Re: Page Class Suffix in template code
Thx Muffin.. just tried that and it's still not having it though!
As a test, I've used '_red' as the page class suffix for a menu - and in my stylesheet I have this:
..I commented out the #page-bg to remove the image for now and tried adding #page-bg_red {background: #cc0000;} to the sheet, but it's not working.. am I doing this right? Also, how would I implement this with just the body {background: #000;} ?
Thx
As a test, I've used '_red' as the page class suffix for a menu - and in my stylesheet I have this:
Code: Select all
body {color: #ccc; background: #000;}
#page-bg {background: url(../images/style10/page-bg.jpg) 50% -85px repeat-x;}
Thx
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
That is not how it will work. The class is being applied to the body tag, so your code would be
body._red #page-bg { background-color: #cc0; }
This is because the class of _red is applied to the <BODY> tag which results in body._red ... and #page-bg is a sub level div below the body tag so is placed after body._red
body._red #page-bg { background-color: #cc0; }
This is because the class of _red is applied to the <BODY> tag which results in body._red ... and #page-bg is a sub level div below the body tag so is placed after body._red
-
- Joomla! Apprentice
- Posts: 45
- Joined: Mon Jul 30, 2007 1:03 pm
Re: Page Class Suffix in template code
Wonderful stuff.. you're a star! This works just as I wanted. I understand what you're saying now re. <BODY> tag and I've learned something new. It wouldn't work with 'background-color' though which is strange, so I changed it to just 'background' and that fixed it.
Thx Muffin.. I really appreciate your time helping me with this.. not everyone understands the finer points of Joomla and guides/tutorials from people such as yourself are really helpful in getting to grips with it all and understanding it more.
Thx again!
Thx Muffin.. I really appreciate your time helping me with this.. not everyone understands the finer points of Joomla and guides/tutorials from people such as yourself are really helpful in getting to grips with it all and understanding it more.
Thx again!
-
- Joomla! Apprentice
- Posts: 12
- Joined: Fri Jun 13, 2008 5:04 am
Re: Page Class Suffix in template code
Thank you! Thank you!
I've been looking for this type of functionality for days. It can be used for SO MANY things. I will use it for different header images on pages for one site I'm working on right now and for different decorative background images on another site.
Now I just have to figure out how to apply different css styles to 3 different articles on the same page - but that's another post. :-)
Thank You!
I've been looking for this type of functionality for days. It can be used for SO MANY things. I will use it for different header images on pages for one site I'm working on right now and for different decorative background images on another site.
Now I just have to figure out how to apply different css styles to 3 different articles on the same page - but that's another post. :-)
Thank You!
-
- Joomla! Apprentice
- Posts: 20
- Joined: Mon Aug 27, 2007 6:42 pm
Re: Page Class Suffix in template code
this works greathis code works for me and doesn't display any errors.
Code: Select all
<?php $menus = &JSite::getMenu(); $menu = $menus->getActive(); $pageclass = ""; if (is_object( $menu )) : $params = new JParameter( $menu->params ); $pageclass = $params->get( 'pageclass_sfx' ); endif; ?> </head> <body class="<?php echo $pageclass; ?>">
- mark_up
- Joomla! Guru
- Posts: 849
- Joined: Sun Oct 29, 2006 10:51 am
- Location: Fiji
- Contact:
Re: Page Class Suffix in template code
Glad you persevered with this MuffinDCC, many thanks
Now, to lobby to have J1.6 scrap page class suffixes and replace them with page classes.. and output to the <body> tag!
Now, to lobby to have J1.6 scrap page class suffixes and replace them with page classes.. and output to the <body> tag!
http://twitter.com/mark_up.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.
- MuffinDCC
- Joomla! Explorer
- Posts: 347
- Joined: Wed Nov 22, 2006 9:07 am
- Location: UK
- Contact:
Re: Page Class Suffix in template code
Lol, I believe in persistent naggingGollumX wrote:Glad you persevered with this MuffinDCC, many thanks
Now, to lobby to have J1.6 scrap page class suffixes and replace them with page classes.. and output to the <body> tag!
-
- Joomla! Apprentice
- Posts: 14
- Joined: Mon Oct 20, 2008 3:58 pm
Re: Page Class Suffix in template code
Hi guys,
I've been looking for a while and this seems pretty close to what i'm looking for. I'm using the RT template 'replicant' and want different content pages to display a different template 'style' preset of which there are 50.
The styles for these are held in the rt_styles.php file, is there a way to call these styles using the page class suffix??
Great work and thanks in advance!
I've been looking for a while and this seems pretty close to what i'm looking for. I'm using the RT template 'replicant' and want different content pages to display a different template 'style' preset of which there are 50.
The styles for these are held in the rt_styles.php file, is there a way to call these styles using the page class suffix??
Great work and thanks in advance!
Ralphonz
http://www.sonic-rites.com/
http://www.sonic-rites.com/
- mark_up
- Joomla! Guru
- Posts: 849
- Joined: Sun Oct 29, 2006 10:51 am
- Location: Fiji
- Contact:
Re: Page Class Suffix in template code
Ralphonz, in your case, if you're using J1.0, you might attempt it first with:
http://extensions.joomla.org/component/ ... Itemid,35/
http://extensions.joomla.org/component/ ... Itemid,35/
http://twitter.com/mark_up.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.
-
- Joomla! Apprentice
- Posts: 14
- Joined: Mon Oct 20, 2008 3:58 pm
Re: Page Class Suffix in template code
Looks perfect!
Thanks! Can't believe i missed it.
Thanks! Can't believe i missed it.
Ralphonz
http://www.sonic-rites.com/
http://www.sonic-rites.com/
-
- Joomla! Apprentice
- Posts: 14
- Joined: Mon Oct 20, 2008 3:58 pm
Re: Page Class Suffix in template code
Hi,
I've tried style ninja but this doesn't work for me as my templates styles are not contained in individual css files but in one php file. That is why i thought the page suffix might solve my problem if it were able to call different styles from this php file.
So far i haven't found anything which might enable me to hack the style ninja module so that it can identify with the styles in the php file rather than be directed to a css file,
another possibility could be to hack my template so that styles are included in separate css files rather than in one php file but I think I might be way out of my depth with this one as I'm not a confident php coder!
If anyone has any suggestions then it much appreciated!
Thanks
I've tried style ninja but this doesn't work for me as my templates styles are not contained in individual css files but in one php file. That is why i thought the page suffix might solve my problem if it were able to call different styles from this php file.
So far i haven't found anything which might enable me to hack the style ninja module so that it can identify with the styles in the php file rather than be directed to a css file,
another possibility could be to hack my template so that styles are included in separate css files rather than in one php file but I think I might be way out of my depth with this one as I'm not a confident php coder!
If anyone has any suggestions then it much appreciated!
Thanks
Ralphonz
http://www.sonic-rites.com/
http://www.sonic-rites.com/
- mark_up
- Joomla! Guru
- Posts: 849
- Joined: Sun Oct 29, 2006 10:51 am
- Location: Fiji
- Contact:
Re: Page Class Suffix in template code
Could you link me to your site please.
http://twitter.com/mark_up.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.