A little overview I have a number of lightwindow popups in my site, namely for news articles etc. I have a pop up template for use with these but I now find a predicament which I thought may be straightforward but I am having a few problems. I have the non-ajax seach on my site and this searches everything including the news.. pretty much. When the news results are displayed as part of the search results these are displayed in the new template which should be a pop up..... obviously not in the search results. I have now created two TV for the templates one is linkClass and one is linkType..... My idea was to change my results output as so
div class="[+as.resultClass+]">
<a class="[+as.LinkClass+]" href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+]</a>
[+as.descriptionShow:is=`1`:then=`
My snippet call is as :[!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0`&tvPhx=`tv:displayTV`&tplResult=`searchresults`!]
Is it possible to use TV to change the link class etc so that news items will popup and normal pages display as normal. Am I mad
Any assistenace greatly appreciated.........
To Summary...... In my search results if the page should be popup I want to change the link class to ’lightwindow page-options’ (stored as a tv) and if its a normal page the link class will be ’orangelink’. I cannot seem to call the TV’s.
Ok Im gonna scrub that idea.........
My Ajax Search box snippet is: [!AjaxSearch? &ajaxSearch=`0` &AS_showResults=`0` &AS_landing=`9` &AS.submitText=``&tvPhx=`tv:displayTV`!]
My Search results page is:<h2>Your Search Results</h2>
<p>[!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0`&tvPhx=`tv:displayTV`&tplResult=`searchresults`!]</p>
My Test Chunk for the display is:<div class="[+as.resultClass+]">
<a class="[+as.resultLinkClass+]" href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+][+as.searchdisplay+]</a>
[+as.descriptionShow:is=`1`:then=`
<span class="[+as.descriptionClass+]">[+as.description+]</span>
`+]
[+as.extractShow:is=`1`:then=`
<div class="[+as.extractClass+]"><p>[+as.extract+]</p></div>
`+]
[+as.breadcrumbsShow:is=`1`:then=`
<span class="[+as.breadcrumbsClass+]">[+as.breadcrumbs+]</span>
`+]
</div>
I have creataed a TV called SearchDisplay I have assigned 4 values to this. The idea being in the results the link type will change according to the TV value.
1. Standard Link
2. News Popup Link
3. Candidate Popup Link
4. Template Popup link
I can use an if else kind of arrangment but the problem I am having is that my custom TV will not appear in any way shape or form?
I have installed PHx and all seems to work fine with that..... Can anyone offer any guidance with this please.
Thanks
James