Gossamer Forum
Home : Products : Gossamer Links : Discussions :

page_id in link.html

Quote Reply
page_id in link.html
I am trying to use the following code in link.htmI
It does not work and I need to know if it should work.

Code:
<%if page_id eq "modify_select"%>
Do something
<%endif%>

In include_sidebar.html, this works...
<%if page_id eq "home"%>
Do something
<%endif%>

this works too in include_sidebar.html...
<%if page_id eq "category"%>
Do something
<%endif%>


Basically, I want to show different actions(links) below each link listing when on modify_select.html
When link listings are displayed via modify,_select, I want to show "Edit link" and "Payment", whereas when browsing categories, I just want to show "Rate It" and other links.

Thank you,
Chris
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] page_id in link.html In reply to
It should work. Try just printing the value of page_id in link.html and viewing the page.

Adrian
Quote Reply
Re: [brewt] page_id in link.html In reply to
I put <%page_id%> in the link listing.
It ALWAYS says "link" without the quotes. No matter what page I am on (home, category, modify_select).

I use multiple link templates, so they are included like...
<%loop link_results_loop%>
<%link_include%>
<%endloop%>


Where link_include is a global

Chris
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] page_id in link.html In reply to
page_id refers to the page which was directly passed into Links::user_page. Since you are calling user_page yourself (probably indirectly through another method), page_id is set to 'link'. You shouldn't be doing things this way, but instead just doing the include in the template itself (ie. <%include link.html%>), and the global should be returning the variables needed by link.html.

Adrian