Joomla Indonesia

Login or Sign Up
Sign In or Register
Avatar
Not Registered Yet?

Join Now! It's FREE. Get full access and benefit from this site

Reset My password - Remind Me My username

Username
Password
Remember me
  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Bloggers
    Bloggers Search for your favorite blogger from this site.
  • Team Blogs
    Team Blogs Find your favorite team blogs here.
  • Login
    Login Login form

Menghilangkan ID pada Artikel Tanpa Component

Posted by on in Tip Dan Trik
  • Font size: Larger Smaller
  • Hits: 6461
  • 4 Comments
  • Subscribe to this entry
  • Print

Copy ‘components/com_content/router.php‘ ke path ‘/your-template/html

 

Buka

components\com_content\router.php Lakukan perubahan

ganti line 27

$advanced    = $params->get('sef_advanced_link', 0);

menjadi

$advanced    = $params->get('sef_advanced_link', 1);


Ganti Line 208

$advanced    = $params->get('sef_advanced_link', 0);

Menjadi

$advanced    = $params->get('sef_advanced_link', 1);


Ganti Line

228-232 (tambah code /* )

if (strpos($segments[0], ':') === false) {
    $vars['view'] = 'article';
    $vars['id'] = (int)$segments[0];
    return $vars;
}

menjadi non fungsi atau seperti dibawah

/*
if (strpos($segments[0], ':') === false) {
    $vars['view'] = 'article';
    $vars['id'] = (int)$segments[0];
    return $vars;
}*/




Penambahan code di xml config

administrator\components\com_content\config.xml

<field name="sef_advanced_link"
    type="radio"
    default="0"
    label="Sef Advanced Mode"
    description="Remove ItemID from Content URL?">
        <option    value="0">JNO</option>
        <option    value="1">JYES</option>
</field>

setting di parameter article manager seperti gambar dibawah (konfigurasi akan ada jika penambahan code di file xml config sudah ditambahkan)

[attachment=7050]SNAGHTML5e7fe88_thumb.png[/attachment]


sumber : http://developernote.com/2012/05/how-to-remove-id-from-url-in-joomla-2-5/

 

0

People in this conversation

  • mau tanya gan :)

    saya cari file administrator\components\com_content\config.xml
    file config.xml kok gak ada yah :(

    tapi kalau components\com_content\router.php ada gan

    0 Like Short URL:
  • maaf gan maksud saya kode ini ;

    <field name="sef_advanced_link"
    type="radio"
    default="0"
    label="Sef Advanced Mode"
    description="Remove ItemID from Content URL?">
    <option value="0">JNO</option>
    <option value="1">JYES</option>
    </field>

    0 Like Short URL:
  • di joomla 2.5.11 ga jalan ya gan?

    0 Like Short URL:
  • Ikut nambahin gan... dapet dari form sebelah untuk joomla 3.1.5

    Line 27
    $advanced = $params->get('sef_advanced_link', 0);
    Ganti
    $advanced = $params->get('sef_advanced_link', 1);
    Line 250
    $advanced = $params->get('sef_advanced_link', 0);
    ganti
    $advanced = $params->get('sef_advanced_link', 1);

    Line 376
    ->where($db->quoteName(‘alias’) . ‘ = ‘ . $db->quote($db->quote($segment)));
    Ganti
    ->where($db->quoteName('alias') . ' = ' . $db->quote($segment));

    0 Like Short URL:

Kategori Blog

Joomla User Group Indonesia

Joomla User Group indonesia

Id-joomla.com adalah situs resmi Joomla User Group (JUG) Indonesia dan Joomla Translation Team

 
Download Terjemahan Joomla terakreditasi dari JoomlaCode dan laporkan bugs, ide dan saran nya di Sub Forum Hanacaraka

Socials

twitter id joomlafb idjoomla