Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I have a search page with a refiner drop down on left side, on my home page i have a drill down menu with some static menu items. these menu items and refiner drop down items on the search have same values, on selection of menu item user will be navigated to the search page and selected navigation item will be added to the query string and same value will be selected in the refiner drop down.

each navigation item renders anchor tag as described below:

<a href="search.aspx?refinner=currentNavigationTitle">currentNavigationTitle</a>

this is how it is working in a static html site, Will this works same way in tridion? I have "search.aspx" page published and home page is rendering drill down menu.

Hoe can i link navigation items to search page and pass a query string value?

I found following syntax for same thing but that requires "component id to be provided, I don't know what would be the component id

<tridion:ComponentLink runat="server" 
ComponentURI="tcm:41-87758" 
LinkText="disclaimer"     
PageURI="tcm:0-0-0" TemplateURI="tcm:0-0-0" AddAnchor="false" 
TextOnFail="true"/>
share|improve this question

2 Answers 2

up vote 10 down vote accepted

You need to make a choice between static and dynamic linking:

The advantage of dynamic links is that if you move the search page, the link URL is updated automatically. however, in your case using static links is not so bad if the search page is never going to be moved or unpublished (which seems likely to be the case) - especially if there are many navigation items to this search page that are rendered on all pages - static links will be much less of a performance hit.

If you want to use dynamic linking, you then need to choose between Page and Component linking.

With a Page link (<tridion:PageLink/>) you link to your search page by passing the TCM URI of the search page in Tridion in the PageUri attribute. You can put your additional query string parameters in the Parameters attribute. See the online docs [login required] for all attributes

With a Component link (<tridion:ComponentLink/>)you link to a Component on your search page by passing the TCM URI of the component in Tridion in the ComponentUri attribute. There is no Parameters attribute, so for your requirement you would need to create your own extended Component Link control to add one - and there is this exact example here

share|improve this answer
    
Here is the syntax I am using but it is not rendering anything. <tridion:PageLink pageURI="tcm:83-3242-64" linkText="What we do" textOnFail="true" anchor="" linkAttributes=""/> –  Shafaqat Ali Dec 31 '13 at 1:14
    
Are you using .NET? If so, you need runat="server", the attributes should also be Capitalized (PageUri not pageUri etc.) - check the online docs (I added a link in my answer) –  Will Price Dec 31 '13 at 8:08

Your webpage is dynamic so you can probably build the link yourself using the tridion api directly (rather than a tag as you are above) - doing so will most likely be really fidly but for something a bit more robust you could write your own custom tag, you'll find more information about creating a custom tag here: http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2013/task_1F8D35C28DB848B1ABB1BCE859972173 (Log in required).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.