Gossamer Forum
Home : Products : Gossamer Links : Discussions :

GLinks 3.x Docs: The luna template set globals

Quote Reply
GLinks 3.x Docs: The luna template set globals
With the rewrite of the 'default' template set, we've also cleaned out a lot of the old globals that contained style information. This document will describe the new globals used in the luna template set.

The new globals.txt mainly contains options which control the output of certain aspects of the template. Here's a description of what each global does:
  • category_cols (default value: 2): This value controls the number of columns that will be displayed in category.html. If you change this value, then you must remember to also change the "#category dl" CSS rule to reflect this change.

  • category_separator (default value: ' > '): This is the text that will be inserted in between each category in a category title. This value is html escaped by default, so if you want to use html, then add a no_escape_category_separator global with a value of '1'.

  • crumb_separator (default value: ' > '): This is the same as category_separator except it is used for the 'bread crumb'. To use html in this value, create a no_escape_crumb_separator global.

  • detailed_max_reviews (default value: 5): This value limits the maximum number of reviews to display on a link's detailed page.

  • home_category_cols (default value: 2): This is the same as category_cols, except this is for the columns on the home page. Remember to change the corresponding "#home dl" CSS rule.

  • paging_options: See the Customising the paging toolbar HOWTO for detailed information.

  • site_title (default value: 'Gossamer Links'): This value is used in various places, for example in the title of each page.


Adrian
Quote Reply
Re: [brewt] GLinks 3.x Docs: The luna template set globals In reply to
It would be nice if globals are also added for meta_description and meta_keywords for the Non Category pages... as discussed in the other thread.

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [brewt] GLinks 3.x Docs: The luna template set globals In reply to
is the "home_category_cols" in the new G-Links3.0 bringing the same effect as the "Yahoo-subcats-plugin" ? Is there a difference ?
I have the "Yahoo-subcats-plugin" on my homepage installed by GT-staff. Should I delete this plugin now ?


Thanks,

Erich


Quote Reply
Re: [erichcyber] GLinks 3.x Docs: The luna template set globals In reply to
No, they do different things. home_category_cols just controls the number of columns the categories will generate. the Yahoo subcats plugin adds in the extra description for the categories.

Adrian
Quote Reply
Re: [brewt] GLinks 3.x Docs: The luna template set globals In reply to
Why aren't these options moved to the Config?

The Global edit page, should contain just 1 example global, a site_title, a company name, and nothing else...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [brewt] GLinks 3.x Docs: The luna template set globals In reply to
category_cols (default value: 2): This value controls the number of columns that will be displayed in category.html. If you change this value, then you must remember to also change the "#category dl" CSS rule to reflect this change.

"#category dl" CSS rule to reflect this change <--- I don't understand what this means. Could you dumb it down some.

I want a subcategory page to seperate into 3 columns.

Thanks,
Leeann
Quote Reply
Re: [leeann] GLinks 3.x Docs: The luna template set globals In reply to
Go to the CSS Editor (Build => CSS Editor), and view the luna_core.css file. At the bottom of that file, it tells you what you need to do.

Adrian
Quote Reply
Re: [brewt] GLinks 3.x Docs: The luna template set globals In reply to
I went to the globals and changed the category_cols to 3.
Then I went to the CSS Editor and removed the */ from this -
*/
#category dl {
width: 33%;
}
*/

Is that all I need to do? If so, it didn't work.

Thanks -
Leeann
Quote Reply
Re: [leeann] GLinks 3.x Docs: The luna template set globals In reply to
It probably would be better to keep commented version of this where it is

Code:

#category dl {
width: 33%;
}


and copy a new one somewhere else in the script (either the top or the bottom where the tutorial comments are not).

But Yes, adding that code, along with changing the category_cols template global should do what you want. (I agree with webmaster33 that these values should be moved to the config. I also think the style sheets can be more confusing than helpful to new users.)

Hope this helps,

- Jonathan
Quote Reply
Re: [jdgamble] GLinks 3.x Docs: The luna template set globals In reply to
Thanks for the reply. I did what you said, but the third column is still landing under the second column. There is a huge area to the right which looks like a shadow (I guess?) and at this point is just wasted space. Can I get rid of it so the area where the columns are expands so that all three fit?

Thanks again.
Leeann
Quote Reply
Re: [jdgamble] GLinks 3.x Docs: The luna template set globals In reply to
In Reply To:
I agree with webmaster33 that these values should be moved to the config.
They shouldn't be moved into the config because it is something that could easily be changed between different template sets. There probably should be to be a per template configuration file, but something like that will have to wait.

Adrian
Quote Reply
Re: [leeann] GLinks 3.x Docs: The luna template set globals In reply to
In Reply To:
Thanks for the reply. I did what you said, but the third column is still landing under the second column.
Try changing the percentage to 32%. Sometimes it ends up being too big and wrapping. Other thing to make sure is that the CSS is commented out (/* ... */).

In Reply To:
There is a huge area to the right which looks like a shadow (I guess?) and at this point is just wasted space. Can I get rid of it so the area where the columns are expands so that all three fit?
That's the rightsidebar. That's also an example in the luna.css file:
Code:
/* Hide the right sidebar */
#ocwrapper {
border-right-width: 0px;
}
#rightsidebar {
display: none;
}
#contentheader .error, #contentheader .message {
margin: 0px;
}

Adrian
Quote Reply
Re: [brewt] GLinks 3.x Docs: The luna template set globals In reply to
In Reply To:
They shouldn't be moved into the config because it is something that could easily be changed between different template sets. There probably should be to be a per template configuration file, but something like that will have to wait.[/quote]

That makes sense.

- Jonathan
Quote Reply
Re: [brewt] GLinks 3.x Docs: The luna template set globals In reply to
Just to make sure it does work (and it does), I set up a inherited template set on our demo: http://demo.gossamer-threads.com/....cgi?d=1;t=luna3cols

That's with home_category_cols set to 3, and the rightsidebar hidden.

I've also changed the category_cols to 4 and you can see that here: http://demo.gossamer-threads.com/...html;t=luna3cols;d=1

The CSS can be viewed here: http://demo.gossamer-threads.com/...a3cols/luna3cols.css

Adrian