Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 92906
BY: Admin Admin (kimberlygriggs)
DATE: 2010-03-02 00:28
SUBJECT: RE: One way to do this...

 

Are you planning on doing this for every subject then?

You might want to try doing it with parameters.

Set a param in srg_controller index method: @subject = 0 || params[:subject]

then access @subject in script variables
subject.defaultExpanded(<%=@subject%>)

change your route to:
map.connect 'subject-guides/:id',
:controller => "srg",
:action => "published_guides"

Then your URLS are like: http://ica.library.oregonstate.edu/subject-guides?subject=1/

haven't tested it but something like it should work. And cleaner then making a lot of copies and changes.


Thread View

Thread Author Date
Create links to specific subject categories?David Lippert2010-02-17 22:47
      One way to do this...David Lippert2010-03-02 00:08
            RE: One way to do this...Admin Admin2010-03-02 00:28
                  RE: One way to do this...David Lippert2010-03-04 21:33

Post a followup to this message