I'm developping a component. today SEF is not enabled.
I access the component via a menu. The resulting url is :
http://localhost/index.php?option=com_gvads&view=gvAds&Itemid=56
I add links in the current page by the following command in the model :
$categories[$i]['linkTarget'] =
JRoute::_('index.php?option=com_gvAds&task=category&id='.$row->id);
After that linkTarget is something like that :
http://localhost/index.php?option=com_gvAds&task=category&id=7
The Itemid does appear. What did I miss ?
regards
Julien
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
In fact, i did sexeral attemps and it seems that router.php
Is called only if sef is enabled .
Julien
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
Hannes
Am 30.12.2011 07:57, schrieb Swapnil Shah:
> Hey Folks,
>
> anyone have a problem with itemid not being found for com_users?
>
> I am using the following syntax
> JRoute::_('index.php?option=com_users&view=login&return='.$returnUrl,
> false)
>
> since the option is not equal to com_users the JRoute doesn't set the
> Itemid automatically. Anyone know how to get JRoute to set the itemId?
> or do I have to do it manually?
>
> thanks,
>
> Neil
>
> On 12/7/2010 4:30 AM, Prasit Gebsaap wrote:
>> Ok, then your problem was completely solved, right?.
>>
>> On 5 December 2010 22:50, Julien <qdaem...@yahoo.com
>> <mailto:qdaem...@yahoo.com>> wrote:
>>
>> Sorry for mistyping :
>>
>> the field option was setted to com_gvads instead of com_gvAds....
>>
>> Thanks a lot
>>
>> Regards
>> Julien
>>
>> On 5 d�c, 16:49, Julien <qdaemon...@yahoo.com
>> <mailto:qdaemon...@yahoo.com>> wrote:
>> > Hi Prasit
>> >
>> > Do you have a backdoor to my computer ?
>> > You're right : in the #__component table, in the component record,
>> > the field option was setted to com_gva
>> >
>> > On 28 nov, 21:08, Prasit Gebsaap <prasit.gebs...@gmail.com
>> <mailto:prasit.gebs...@gmail.com>> wrote:
>> >
>> > > Sorry for late answer, I just cambe back from vacation. For
>> your case, it is
>> > > very strange problem. Normally Joomla use menu parameter to
>> retreive Itemid.
>> > > If in your case, if com_gvAds is a current component it
>> should work fine. I
>> > > don't know in database (#__components), what name was stored
>> for your
>> > > component, com_gvAds or com_gvads?
>> >
>> > > On 26 November 2010 05:01, Julien <qdaemon...@yahoo.com
>> <mailto:prasit.gebs...@gmail.com>> wrote:
>> > > > > Hi Julien,
>> >
>> > > > > If it is Joomla! 1.5 component #__component is the only
>> one table related
>> > > > to
>> > > > > component. So in this case when you first click on a menu
>> item in
>> > > > frontend,
>> > > > > there is Itemid, right? So you should check where you
>> left off Itemid by
>> > > > not
>> > > > > using JRoute. router.php was called when you enable SEF,
>> but this is not
>> > > > a
>> > > > > case as Joomla! always maintain Itemid for breadcrumb,
>> module display
>> > > > etc.
>> > > > > If you manually insert Itemid please make sure that it is
>> Itemid (CAPITAL
>> > > > > I).
>> >
>> > > > > On 24 November 2010 03:43, Julien <qdaemon...@yahoo.com
>> <prasit.gebs...@gmail.com <mailto:prasit.gebs...@gmail.com>> wrote:
>> > > > > > > Hi Julien,
>> > > > > > > For your development, you started by making zip
>> package then install
>> > > > via
>> > > > > > > Joomla backend or you just create folders and file.
>> Because it is
>> > > > very
>> > > > > > > strange for that.
>> >
>> > > > > > > On 23 November 2010 02:26, Julien
>> <qdaemon...@yahoo.com <mailto:qdaemon...@yahoo.com>> wrote:
>> >
>> > > > > > > > Hum... That does not work for me. See the
>> screenshot (url and
>> > > > > > > > statusbar for the link).
>> >
>> > > > > > > >http://www.la-voltige.com/link.png
>> >
>> > > > > > > > The link is generated with the following line :
>> >
>> > > > > > > > $categories[$i]['linkTarget'] = JRoute::_('index.php?
>> > > > > > > > option=com_gvAds&task=category&id='.$row->id);
>> >
>> > > > > > > > If I do :
>> > > > > > > > $categories[$i]['linkTarget'] = JRoute::_('index.php?
>> > > > > > > > option=com_gvAds&task=category&id='.$row-
>> > > > > > > > >id.'&Itemid='.JRequest::getInt('Itemid', 0));
>> >
>> > > > > > > > it works but it's not a good pratice.
>> >
>> > > > > > > > regards
>> > > > > > > > Julien
>> >
>> > > > > > > > On 21 nov, 21:23, Prasit Gebsaap
>> <prasit.gebs...@gmail.com <mailto:prasit.gebs...@gmail.com>> wrote:
>> > > > > > > > > I think you if you not lose your Itemid along the
>> way, JRoute
>> > > > will do
>> > > > > > it
>> > > > > > > > for
>> > > > > > > > > you. For example if you start from menu which
>> having Itemid, and
>> > > > then
>> > > > > > you
>> > > > > > > > > use JRoute everywhere. Then you should not have
>> the problem. But
>> > > > if
>> > > > > > you,
>> > > > > > > > at
>> > > > > > > > > some point, forgot to use JRoute so Itemid
>> disappear. if you come
>> > > > > > back to
>> > > > > > > > > JRoute again, It can not help you there.
>> >
>> > > > > > > > > On 22 November 2010 03:10, TytooF
>> <tyt...@gmail.com <mailto:tyt...@gmail.com>> wrote:
>> >
>> > > > > > > > > > Hello Julien,
>> >
>> > > > > > > > > > In fact, i think that you have to code your
>> component
>> > > > router.php
>> > > > > > that
>> > > > > > > > > > you have to put at the root of your component
>> folder.
>> >
>> > > > > > > > > > When you put a JRoute::_() method in your code
>> to have the
>> > > > route to
>> > > > > > > > > > your item, Joomla call the corresponding
>> router.php file
>> > > > (depending
>> > > > > > on
>> > > > > > > > > > option value). You can find some good exemple
>> in core
>> > > > components.
>> >
>> > > > > > > > > > On 21 nov, 12:37, Julien Devillers
>> <qdaemon...@yahoo.com <mailto:qdaemon...@yahoo.com>>
>> > > > wrote:
>> > > > > > > > > > > well, in fact, that's what I tried
>> successfully but the doc
>> > > > says
>> > > > > > that
>> > > > > > > > > > JRoute
>> > > > > > > > > > > handles it automaticallyhttp://
>> > > > docs.joomla.org/Routing(search
>> <http://docs.joomla.org/Routing%28search>
>> > > > > > > > "itemid")
>> > > > > > > > > > and I did not found in all
>> > > > > > > > > > > joomla classes, a component
>> > > > > > > > > > > that add it "manually". So there should be
>> another way to
>> > > > do...
>> >
>> > > > > > > > > > > Thanks
>> > > > > > > > > > > Julien
>> >
>> > > > > > > > > > > ________________________________
>> > > > > > > > > > > De : Davide Tampellini <tampe...@gmail.com
>> <mailto:tampe...@gmail.com>>
>> > > > > > > > > > > � : joomla-de...@googlegroups.com
>> <mailto:joomla-de...@googlegroups.com>
>> > > > > > > > > > > Envoy� le : Dim 21 novembre 2010, 12h 32min 12s
>> > > > > > > > > > > Objet : Re: JRoute and Itemid
>> >
>> > > > > > > > > > > hehe i had the same problem too..
>> > > > > > > > > > > solution: add the itemid manually.
>> >
>> > > > > > > > > > > you can create a function that gets the
>> Itemid parameter and
>> > > > adds
>> > > > > > it
>> > > > > > > > to
>> > > > > > > > > > the
>> > > > > > > > > > > link.
>> > > > > > > > > > > at least, this is what i did, if there are
>> any other
>> > > > solutions..
>> >
>> > > > > > > > > > > 2010/11/21 Julien Devillers
>> <qdaemon...@yahoo.com <mailto:qdaemon...@yahoo.com>>
>> <mailto:joomla-de...@googlegroups.com>.
>> > > > > > > > > > > >To unsubscribe from this group, send email to
>> > > > > > > > > > >
>> >joomla-dev-gene...@googlegroups.com
>> <mailto:joomla-dev-general%2Bunsu...@googlegroups.com><joomla-dev-general%2Bunsu...@googlegroups.com
>> <mailto:joomla-dev-general%252Buns...@googlegroups.com>>
>> > > > <joomla-dev-general%2Bunsu...@googlegroups.com
>> <mailto:joomla-dev-general%252Buns...@googlegroups.com><joomla-dev-general%252Buns...@googlegroups.com
>> <mailto:joomla-dev-general%25252Bun...@googlegroups.com>>
>> >
>> > > > > > <joomla-dev-general%2Bunsu...@googlegroups.com
>> <mailto:joomla-dev-general%252Buns...@googlegroups.com><joomla-dev-general%252Buns...@googlegroups.com
>> <mailto:joomla-dev-general%25252Bun...@googlegroups.com>>
>> > > > <joomla-dev-general%252Buns...@googlegroups.com
>> <mailto:joomla-dev-general%25252Bun...@googlegroups.com><joomla-dev-general%25252Bun...@googlegroups.com
>> <mailto:joomla-dev-general%2525252Bu...@googlegroups.com>>
>> >
>> > > > > > > > <joomla-dev-general%2Bunsu...@googlegroups.com
>> <mailto:joomla-dev-general%252Buns...@googlegroups.com><joomla-dev-general%252Buns...@googlegroups.com
>> <mailto:joomla-dev-general%25252Bun...@googlegroups.com>>
>> > > > <joomla-dev-general%252Buns...@googlegroups.com
>> <mailto:joomla-dev-general%25252Bun...@googlegroups.com><joomla-dev-general%25252Bun...@googlegroups.com
>> <mailto:joomla-dev-general%2525252Bu...@googlegroups.com>>
>> >
>> > > > > > <joomla-dev-general%252Buns...@googlegroups.com
>> <mailto:joomla-dev-general%25252Bun...@googlegroups.com><joomla-dev-general%25252Bun...@googlegroups.com
>> <mailto:joomla-dev-general%2525252Bu...@googlegroups.com>>
>> > > > <joomla-dev-general%25252Bun...@googlegroups.com
>> <mailto:joomla-dev-general%2525252Bu...@googlegroups.com><joomla-dev-general%2525252Bu...@googlegroups.com
>> <mailto:joomla-dev-general%252525252B...@googlegroups.com>>
>> >
>> > > > > > > > > > .
>> > > > > > > > > > > >For more options, visit this group at
>> > > > > > > > > > >
>> >http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>> >
>> > > > > > > > > > > --
>> > > > > > > > > > > You received this message because you are
>> subscribed to the
>> > > > > > Google
>> > > > > > > > Groups
>> > > > > > > > > > > "Joomla! General Development" group.
>> > > > > > > > > > > To post to this group, send an email to
>> > > > > > > > > > joomla-de...@googlegroups.com
>> <mailto:joomla-de...@googlegroups.com>.
>> > > > > > > > > > > To unsubscribe from this group, send email to
>> > > > > > > > > > >
>> joomla-dev-gene...@googlegroups.com
>> <mailto:joomla-dev-general%2Bunsu...@googlegroups.com><joomla-dev-general%2Bunsu...@googlegroups.com
>> <mailto:joomla-dev-general%252Buns...@googlegroups.com>>
>> > > > <joomla-dev-general%2Bunsu...@googlegroups.com
>> <mailto:joomla-dev-general%252Buns...@googlegroups.com><joomla-dev-general%252Buns...@googlegroups.com
>> <mailto:joomla-dev-general%25252Bun...@googlegroups.com>>
>> >
>> > > > > > <joomla-dev-general%2Bunsu...@googlegroups.com
>> <mailto:joomla-dev-general%252Buns...@googlegroups.com><joomla-dev-general%252Buns...@googlegroups.com
>> <mailto:joomla-dev-general%25252Bun...@googlegroups.com>>
>> >
>> > ...
>> >
>> > plus de d�tails �
>>
>> --
>> You received this message because you are subscribed to the
>> Google Groups "Joomla! General Development" group.
>> To post to this group, send an email to
>> joomla-de...@googlegroups.com
>> <mailto:joomla-de...@googlegroups.com>.
>> To unsubscribe from this group, send email to
>> joomla-dev-gene...@googlegroups.com
>> <mailto:joomla-dev-general%2Bunsu...@googlegroups.com>.
>> For more options, visit this group at
>> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>>
>>
>>
>>
>> --
>> Prasit Gebsaap
>>
>> Nonthaburi, Thailand
>> http://www.joomlant.com <http://www.joomlant.com/>,
>> http://www.joomlant.org <http://www.joomlant.org/>
>> http://ktdms.blogspot.com <http://ktdms.blogspot.com/>,
>> http://lowcost-it.blogspot,com <http://lowcost-it.blogspot,com/>
Thanks for that! UserHelperRoute did the trick!
Pesky helpers!
Regards,
Neil
Sent from my iPhone
>>> On 5 déc, 16:49, Julien <qdaemon...@yahoo.com
>>>>>>>>>>>>> À : joomla-de...@googlegroups.com
>>> <mailto:joomla-de...@googlegroups.com>
>>>>>>>>>>>>> Envoyé le : Dim 21 novembre 2010, 12h 32min 12s
>>>> plus de détails »