151 Posts
jimenaes
8 years ago
4
Topic

Hello 

I wonder if there is a way to use Code Before Render field from Code Pack plug in to set custom variables? If so, could anybody give me some example?

Thanks

Get a Book for SEBLOD
572 Posts
_jrmo
8 years ago
3
Level 1

Hi jimenaes,

Can you please provide a little bit more information? how do you want to use these custom variables in your view? what do you want to set these custom variables to?

Cheers,

James

151 Posts
jimenaes
8 years ago
2
Level 2

Hi _jrmo, thanks for answer.

I'm using a lot of custom variables to display related content inside list modules. For example I have three content types "Exhibition" ,"museum" and "paints". Exhibitions has a related museum field (the id of one museum article), Paints has a related museum field and an exhibition related field. I have a search type "A" to list all my exhibition where every item has in the link -> view configuration to send a custom variable "museum_id" to the URL when it is displayed. Then I have a search type "B" for "museums" and a list module to dipslay the results in a top position, above joomla content view. If I'm seeing an exhibition this module displays the Museum name and has a link to the museum content view using the live variable -> url -> "museum_id". I also have a search type "C" for "paints" and a list module to display the results below the exhibition content. This module show a grid of "paints" related to the exhibition using the live variable "id", this items links have to catch the custom variable uri = "museum_id" so when the "paint" content view is diplayed the module for the search type "B" could display the related "museum" name. The problem is when the "paint" content view is opened from the related module, the URI doesn't write the custom variable "museum_id". this problem is only when the items is in a module.

I have had this problem for several months now, and tried many ways but I can´t find a solution, so I thought that maybe if I could write the custom uri variable when any content view is displayed (something like the default article id variable) I wouldnt need to struggle width the items links and from where are they coming (modules or not modules..)

Another similar problem has to be width the url paths, when an item from a list type is in a module the link-> view-> menu item doesn't work, no matter what you set in the configuration the item opens in the "inherit" item menu. I tried to explain this problems here (http://www.seblod.com/community/forums/general-discussions/url-variables-redirect-to-content#post41999) but I think I dind't explain them well.

:(

Any help will be great

572 Posts
_jrmo
8 years ago
1
Level 3

Hi there,

OK - have you tried this SEBLOD field to display your lists, instead of modules? http://www.seblod.com/store/extensions/8538 it may give you some better flexibility in order to pass variables in your links between the parent and the links in the embedded lists.

Please let me know if that helps.

James

151 Posts
jimenaes
8 years ago
0
Level 4

Hi, I'm also using that Seblod extension in my project but the reason I used the modules here is beacuse they give me the option to random+shuffle de results and to set custom variables to the "see more" link. I don't have those options if I use the List&search seblod field.

Get a VIP membership