Page 1 of 1
News Category Dropdown - Pagination Problem
Posted: Wed Apr 28, 2010 8:39 am
by tallphil
Hi all, I've set up CMSMS News with Categories and put in a Category Selector Dropdown box, as written about on CalGuy's website:
http://calguy1000.com/Blogs/17/60/news- ... pdown.html
My problem now is that the pagination links don't honour the selected category. So, with pagelimit set to 4, the links at the bottom don't take you to the next page, but just reset the category.
As far as I can tell, this is because the & symbol in the URL is being converted to "
&m8d765" or something similar (it changes every time). Any ideas why? Page in question is here:
http://www.senexis.com/news.html
Re: News Category Dropdown - Pagination Problem
Posted: Wed Apr 28, 2010 4:31 pm
by JeremyBASS
Worked for me???
Re: News Category Dropdown - Pagination Problem
Posted: Wed Apr 28, 2010 4:37 pm
by Nullig
Your links work fine for me.
Nullig
Re: News Category Dropdown - Pagination Problem
Posted: Wed Apr 28, 2010 7:58 pm
by tallphil
Sorry all, I got around the problem by changing the way that the website works - the dropdown now redirects to a specific page with a {news category="something specific"} in it.
I couldn't figure out the previous problem.
Re: News Category Dropdown - Pagination Problem
Posted: Wed Jul 28, 2010 3:07 pm
by konsument
hey tallphil,
could you please show me your dropdown template? Im trying to get the same results as you have on senexix - but without success..
Re: News Category Dropdown - Pagination Problem
Posted: Wed Jul 28, 2010 4:11 pm
by tallphil
Of course - I wrote a global content block called
news_categories with the following code:
Code: Select all
<form id="news_filters" name="news_filters">
<select name="news_category" onchange="location.href=news_filters.news_category.options[selectedIndex].value+'.html'">
<option value="news"{if $page_alias == 'news'} selected="selected"{/if}>- All Articles -</option>
<option value="option1"{if $page_alias == 'option1'} selected="selected"{/if}>Option 1</option>
<option value="option2"{if $page_alias == 'option2'} selected="selected"{/if}>Option 2</option>
<option value="option3"{if $page_alias == 'option3'} selected="selected"{/if}>Option 3</option>
</select>
</form>
Essentially it's just a javascript jump box, which uses smarty to check which page it is being called from.
Then I created pages with aliases listed in the dropdown box (option1, option2 etc). Each one has it's own instance of the news module, for example:
Code: Select all
<h1>{global_content name='news_categories'}<a href="news.html">News - Option 3</a></h1>
{news pagelimit=4 category_id=3}
These pages are not included in the main site navigation.
Hope that helps! Let me know if you need any further explanation or help...
Phil