Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Constructing the URL for the data item page 03 Sep 2012 06:53 #3355

  • geoffr
  • geoffr's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 68
  • Thank you received: 2
I am not a programmer and JCook has been great so far. I'm not afraid to go under the hood but I have difficulty finding my way around... Is it possible to do the following? --

I need the flexibility to point to a record in my database by a field OTHER THAN the basic record ID, as the data for our component is repopulated when we update, and the record ID (`cid`) changes for the same item after an update.

Is there a way to construct the page URL so that it references a different field such as `tool_id` instead of the usual `cid`? If so, may I ask how? I'm not sure where to start. :blush:

Thanks in advance,
Geoff

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 04 Sep 2012 05:29 #3367

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Nothing to do with the url.

I mean, it is secondary.

First of all, you must change your query string in the item model. It have been spoken here many times.
(And in V2.0, the query construction is much more easy to change)

Then, if you want an url param, just catch it in the model to construct the previous query.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 04 Sep 2012 05:40 #3369

  • geoffr
  • geoffr's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 68
  • Thank you received: 2
Thanks admin.

I know that a url parameter can be gained in PHP from myVariable = $_GET["myVariableKey"], but I don't know where and how to "catch it in the model" or how to construct the URL so that it is created properly in the MenuItem admin. ...is it simple enough to explain? where and how I do this?

thanks!
Geoff

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 04 Sep 2012 05:58 #3370

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Easiest, but deprecated :
$var = JRequest::getVar('var','default');

Now, the right use is : (V2.0 ;-) )
$jinput = JFactory::getApplication()->input;
$var	= $jinput->get('var', 'default', 'STRING');
last param is a filter against injections see the possible values in the API
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: Constructing the URL for the data item page 04 Sep 2012 06:04 #3371

  • geoffr
  • geoffr's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 68
  • Thank you received: 2
Thanks again - much appreciated! Holding my breath for V2! ... will I survive? ;-)

Cheers,
Geoff

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 26 Sep 2012 12:56 #4029

  • BTB300
  • BTB300's Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
@geoffr
after i did some testing for admin I have a way to possibly do what you want
and i believe the redirect code is now working

www.j-cook.pro/forum/18-closed-tickets/3...mit=10&start=20#4001

This post shows how to
- pass multiple values - (outside cook)
- pass value other than the current ID - (outside cook)

Hope it helps
BTB300

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Re: Constructing the URL for the data item page 26 Sep 2012 20:41 #4042

  • geoffr
  • geoffr's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 68
  • Thank you received: 2
Thanks BTB300 - do you have that link? Thanks!

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 26 Sep 2012 20:45 #4043

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 26 Sep 2012 21:01 #4044

  • BTB300
  • BTB300's Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
Sorry Geoff,
Forgot to paste it (24 hours with no sleep i guess will do that)
At least Admin is on the ball !

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 22 Oct 2012 04:06 #4688

  • geoffr
  • geoffr's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 68
  • Thank you received: 2
Thanks for your help so far on this.. but I'm struggling to find some straight forward instructions on how to retrieve records using parameters other than the CID, e.g. a combination of ToolID and Number.

Together these keys will filter the result I need (and allow for changing cids since the data gets reloaded regularly).

Is anyone able to provide some clear instructions -- is this something I do in Cook or do I need to edit the component files? If files, which ones?

Many thanks.

I haven't started using V2 yet, as I understand it has bugs.... is that still the case?

thanks,
Geoff

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 23 Oct 2012 19:49 #4701

  • BTB300
  • BTB300's Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132

geoffr wrote: I haven't started using V2 yet, as I understand it has bugs.... is that still the case?

With out bugs the world would not move ahead...
If we all waited till all the "bugs" are ironed out we would all be waiting a very long time...

Unsure about V2.0?
Try it and see...
Help V2.0 become stable by reporting any issues...

No wonder your lost "1.5" my post was for Cook 2.0/ Joomla 2.5 - redirects are treated differently

Move to 2.0 then I may be able to help... anyhow let me know when you have tried it on 2.0/2.5 build

Happy to help when I get back... After Halloween
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Re: Constructing the URL for the data item page 24 Oct 2012 07:45 #4705

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Hi @geoffr,

Everything that @BTB300 said is correct, developing with the software is really the only way that we can help to stabalise it and resolve any issues/bugs because there are so many variables in the multitude of uses of cook and development and server environments etc...

To specifically answer any doubts you may have relating to bugs in Cook V2.0, the number of new tickets generated specifically relating to version 2 has been diminishing over recent weeks. Also, I'm sure that there are only a few things for admin to do to take it out of beta and make it fully-production ready.

I would also add that, with an ever evolving service that's so responsive requests for additional functionalities, there will always be bugs. Therefore, we as users, are all important to the development and testing process.

Lastly, V2.0 rocks + you are far more likely to get issues resolved as I believe that no further issues will be addressed in V1.5.

Hope this helps and that you enjoy v2!!!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 24 Oct 2012 07:56 #4708

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
V2.0 is still in beta, because the filters parts are still in dev.
It will handle more functionalities, and be handled better, nicer.

I want also to support for 3.0 in this 2.0 final release, and hope this in cross-version for the same generated component. (J! 2.5 / 3.0)

This is why it take time.
(Do not want to release a new version now, not handling 3.0)

I mean it is not really finished yet. Cook framework rewrite is almost finished.
But almost all issues have been fixed, don't worry.

If you encounter some issues, they cannot be on the application layer (MVC). You can only experiment some Regex, JDom or displaying problems. MVC is 99.9% stable now. (never 100%)

Thanks BTB300, thanks audibleid
Coding is now a piece of cake
The following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

Re: Constructing the URL for the data item page 01 Nov 2012 05:25 #4873

  • geoffr
  • geoffr's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 68
  • Thank you received: 2
Thanks BTB300, Gez, and Admin for your excellent replies. Cook has been fantastic, and the support very good. I wasn't sure of the status of V2, so thanks for clarifying.

Please let us know when you feel V2 is ready for production. I have had to make some customisations to my scripts, so reluctant to start afresh with a new system, though also want to think of the future. V2.0 might be unavoidable for that reason.

Many thanks,
Geoff

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.086 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started