News Category Dropdown - Pagination Problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
tallphil
Forum Members
Forum Members
Posts: 20
Joined: Sat Jan 30, 2010 8:01 pm
Location: Cambridge, UK

News Category Dropdown - Pagination Problem

Post 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
Last edited by tallphil on Wed Apr 28, 2010 11:37 am, edited 1 time in total.
JeremyBASS

Re: News Category Dropdown - Pagination Problem

Post by JeremyBASS »

Worked for me???
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: News Category Dropdown - Pagination Problem

Post by Nullig »

Your links work fine for me.

Nullig
User avatar
tallphil
Forum Members
Forum Members
Posts: 20
Joined: Sat Jan 30, 2010 8:01 pm
Location: Cambridge, UK

Re: News Category Dropdown - Pagination Problem

Post 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.
konsument
Forum Members
Forum Members
Posts: 137
Joined: Thu Oct 26, 2006 9:20 am
Location: Dresden - Saxony - Germany

Re: News Category Dropdown - Pagination Problem

Post 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..
User avatar
tallphil
Forum Members
Forum Members
Posts: 20
Joined: Sat Jan 30, 2010 8:01 pm
Location: Cambridge, UK

Re: News Category Dropdown - Pagination Problem

Post 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
Post Reply

Return to “Modules/Add-Ons”