Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Profile for michaelw

  • OFFLINE
  • Time Zone: GMT +0:00
  • Local Time: 23:41
  • Posts: 4
  • Profile Views: 3909
  • Location: Unknown
  • Gender: Unknown
  • Birthdate: Unknown

Signature

Posts

Posts

emo
Thanks David.

It's really simple (just one function call) to let JRoute take care about SEF.

Thanks again for David your great help ~

Best Regards,
Michael Wai
www.waimichael.idv.hk
How to convert links ...
Category: JoomSEF 3
emo
I've solved my problem myself, although it may not be the best solution.

In my ajax page (default.php inside tmpl), first create JoomSEF router object:

 
// create JRouterJoomsef object if JoomSEF is installed
if (class_exists('JRouterJoomsef')) {
$jRouterJoomsef = new JRouterJoomsef();
} else {
// no JoomSef installed
$jRouterJoomsef = null;
}
 


Then before you paste the link to HTML A tag,

 
$link = 'index.php?option=com_custominfo&view=record&id='.$record->id;
if (null != $jRouterJoomsef) {
// JoomSEF installed and published
$link = $jRouterJoomsef->build($link)->getPath();
}
 


If you installed and published the JoomSEF, the JRouterJoomsef object should be created. Then you can use its function build() to return JURI object, then use JURI's getPath() function to paste the sef'ed path.

Hope this help, thanks.

Best Regards,
Michael Wai
How to convert links ...
Category: JoomSEF 3
emo
I'm using Joomla 1.5.20 and JoomSEF 3.7.4.

Below are the codes for the ajax page layout in my custom component:

 
<php>
ob_clean();
</php>
<php>
foreach ($this->List as $record) {
</php>
<tr>
<td valign="top">
<a href="index.php?option=com_custominfo&view=record&id=
<php>
echo $record->id;
</php>
&Itemid=53"
class="recordHyperLink">
<php>
echo $record->firstname.' '.$record->lastname;
</php>
</a>
</td>
</tr>
<php>
}
</php>
<php>
exit();
</php>
 


The links in this page haven't converted by JoomSEF because of "exit()" at the end.

Could anyone tell me how to convert the links shown in this page with JoomSEF before "exit()"?

Thanks a lot ~~~

Best Regards,
Michael Wai
How to convert links ...
Category: JoomSEF 3
emo
I would like to implement a extension for my own Joomla component, I've search in google for JoomSEF's API documents but no luck.

Could anyone tell me where is it?

Thanks.

Michael Wai
Where can I find Joo ...
Category: JoomSEF
More
Přihlášení uživatele Prázdný