Gossamer Forum
Home : Products : Gossamer Links : Discussions :

5 Glinks Questions :: Template Design Related

Quote Reply
5 Glinks Questions :: Template Design Related
Today I started working on New Template Sets of GLinks (yeah I know I have been living under the stone till now), and I am having a silly question (please forgive my ignorance).

(1) Can someone tell me what does below lines mean
error.html
<%set error_message = $error~%>
<%set error = ''~%>

detailed.html
<%Links::Utils::load_reviews($ID, $detailed_max_reviews)~%>

(2) Crumb
Quote:
<div class="crumb"><%Links::Utils::format_title($main_title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, link_type => 2)%></div>

(a) Is there any other way to display the crumbs?
(b) Is it possible to display linked crumbs without the Home Page (sub category :: third level category ::.. etc, no mention of home page)

(3) Parent Category Link
Suppose I have a first level category as FAQ. Now for the FAQ section and its sub category. I want to setup a crumb link directly to domain.com/FAQ/ any idea how can I display such link even in FAQ's sub categories?

(4) User field proprties on Link.html, detailed.html & others
Normally some users have multiple links and it makes sense to have most common link fields (like user address info and other general stuff) into user profile instead of every link. I had a question on how to display such user properties within link.html & detailed.html and other pages on GLinks where link information is being displayed.

(5) Category Property on Add.html & Add_Success.html
I am having certain extra fields for Categories, for example "Category Description", which I plan to display on add.html so end users who are adding links on the website can better understand if it is the right category for their link or not. I just tried using tag as <%category_description%> in add.html, however it does not seem to work. Any help on how can I use this and other custom category fields in add.html, add_success.html and other related pages. I am seeing many tags under category_loop (after using <%GT::Template::dump%> in template). How can I display these fields on web page?


Again sorry for posting all these questions at the same time and any type of help will be very much appreciated.

Thank you.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] 5 Glinks Questions :: Template Design Related In reply to
(1) That's done in error.html because error messages by default display in the content header (include_contentheader.html). In error.html, we don't want this, so we set it to another variable and unset $error so it doesn't show up in the content header.

The second thing just loads the reviews of the link.

(2) (a) Yes, you can override this function by creating a format_title_override global (see Links/Utils.pm format_title for more details).
(b) Yes, just change include_home => 1 to 0.

(3) Not sure what you mean.

(4) The users table columns will all be stored in the <%user%> hash, so you can get them that way.

(5) I don't think category information is retrieved on those pages. If you need it, you'll need to write a global to fetch it.

Adrian
Quote Reply
Re: [brewt] 5 Glinks Questions :: Template Design Related In reply to
Hello Adrian,

Thank you for the quick reply.

(1) Thank you for the info. While working on the template I will make sure to use those tags for better output.

(2.b) Cool. it works great and does exactly what u said... :)

(3) Actually the answer for 2.b also solved this problem.

(4)
Quote:
The users table columns will all be stored in the <%user%> hash, so you can get them that way.

I am sorry, however cuz of my lack of programming understanding, I was wondering, if it was not too much time consuming, would you be able to show me how to do this? I tried using tags like <%user.address_line1%>, <%user.phone_number%>.. etc but nothing seems to work.

(5) Thank you for the update on this one. I will see if I can get help with any other experts on this forum about getting such global made.

Again thank you for the help.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [brewt] 5 Glinks Questions :: Template Design Related In reply to
Adrian,

In the function discussed above :

detailed.html
<%Links::Utils::load_reviews($ID, $detailed_max_reviews)~%>

At the moment the first posted review appears first, the second second etc.

Is it possible to have the last posted review appear at the top of the list of reviews rather than the first review ever posted ?

At the moment discussions that may occur will never be reflected on the detailed page, whereas reversing the DESC, ASC order would allow this...

Thanks,

John
Significant Media
Quote Reply
Re: [brewt] 5 Glinks Questions :: Template Design Related In reply to
Sorry just read this post that seems to have the solution to this :

http://www.gossamer-threads.com/...i?post=287099#287099

Thanks, John
Significant Media