PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:pass parameter to loadposition? - Joomla 2.5 ! (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:pass parameter to loadposition? - Joomla 2.5 !


#5122
dogfishent (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
pass parameter to loadposition? 2 Years, 7 Months ago Karma: 0  
Hi there.
I love your plugin.
I am using Joomla 2.5 with the newest version of DirectPHP.
I have a question. I have searched the forum and have not seen it mentioned. Forgive me if I missed it.

I have created a custom module and am loading it in an article.
My question is this. Can I send a parameter to be used within the module that is loading?
for example:
Code:
<?php $crid=1; ?> {load position-91}
I would like to use the parameter $crid within the module but it does not seem to pass it at all. Is there a solution for this? Having it work would allow me to write one module for 9 areas all at once. Thanks so much
 
  The administrator has disabled public write access.

#5126
kksou (Admin)
Admin
Posts: 1722
graph
User Online Now Click here to see the profile of this user
Re:pass parameter to loadposition? 2 Years, 7 Months ago Karma: 27  
Hi,

Would you want to elaborate a bit more about your questions e.g.

- What do you mean by "9 areas"? Are the 9 areas within the same article? Or "9 areas" refers to 9 different articles?

- Is your custom module content the same for all the 9 articles?

- Not too sure why would you want to create a module and insert into an article. For such a case, most people would use a plugin. e.g. You might want to take a look at one of the other plugins I've written - the "Include Content Item" plugin that allows you to easily insert the content of one article into another. With this, you can easily insert one article into as many other articles as you want. Coupled this with DirectPHP, you can insert PHP commands into the article to be inserted, and dynamically change the content for each article. (Just make sure that in the Plugin Manager, the order of the include_content_item plugin comes BEFORE that of the DirectPHP plugin.)

In any case, please give me more info so that I know how to help.

Regards,
/kksou
 
  The administrator has disabled public write access.

#5139
dogfishent (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:pass parameter to loadposition? 2 Years, 7 Months ago Karma: 0  
Ok, sorry I was not clear.
I am loading a module into an article.
I have written some custom code that will allow me to create events (start date, end date, title, desc, category for discussion purposes).

I then created the module that will create listings of these custom records and am then loading it a position in an article to create a listing of events for a specific category.

I would like to do this for approximately 9 different articles that co-relate to specific Category IDs.

The reason I would like to pass a variable to the module is that in theory I can simply create the variable (category id) in the article, and call the module. This will then create a listing of the events filtered by the category id. By doing it this way, I was think I could simply write one module and place that loadposition in each of my articles with a category ID. I was thinking that I would not have to insert all of the code in each article but simply load the module and use the parameter passed to create the proper listing.

I think the key here for me is that I wish to create a dynamic listing via module based on a parameter that I pass it.

Does this make better sense?
I realize I could make 9 modules with specific Category IDs but thought it would be fantastic and leave a lot more room for expansion by being able to pass the variable.

Thanks for your response in advance.

Don
 
  The administrator has disabled public write access.
#5924
pepperstreet (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Re:pass parameter to loadposition? - Joomla 2.5 ! 1 Year, 3 Months ago Karma: 0  
I know, this is a rather old topic... but I was looking for the same use-case and solution. People might be intersted in this 3rd-party module for Joomla 2.5

Load Module with Parameters (JED - Joomla 2.5) http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/embed-a-include/22483

qlmodule (JED - Joomla 2.5-3.0) http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/embed-a-include/23369

Have fun.

EDIT:
AFAIK, the previously mentioned modules are the only FREE solutions to achieve parameter overrides/passing. Apart from your own custom development.

Commercial: There is also NoNumber.nl with ModulesAnywhere which can override parameters and AdvancedModuleManager, which can pass custom params to a module. Both are extended features in PRO versions.
 
 
Last Edit: 2013/06/06 04:41 By pepperstreet. Reason: alterantives, versions
  The administrator has disabled public write access.
#5926
Chaseunar (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:pass 1 Year, 2 Months ago Karma: 0  
I think, what is it &#8212; a serious error.
:)

Прелогаем отдых для для взрослых мальчиков -
Проститутки Москвы и Питера
 
  The administrator has disabled public write access.



Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2012. kksou.com. All Rights Reserved