Code for slugified URI's

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • delcorsets
    replied
    Is it possible to pull in a value from a product custom field to be part of the slugified product URI? I found some old posts about this quite a while ago but was unable to get it to work.

    I'm looking to produce a URI that is a slugified expression of: [designer-custom-field]-[product-name] OR if the designer-custom-field is null then just slugified [product-name].

    Leave a comment:


  • Brennan
    replied
    Its probably not best to use the category name in the URL since a product can be part of multiple categories. However if you wanted to do this you could generate all the URLs in excel and import them or you would need to use template code in the product URI template to load the first category the product was assigned to and use that in the URL structure.

    Leave a comment:


  • lesliekirk
    replied
    Circling back to this. The reference page doesn't include how to use the Category Name as the slugified. They are all pulling from the Page Title (slugified_page_title). I'm sure I'm missing the obvious here but how do I slugify the category:name;?

    Thanks!

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by eldon99 View Post
    Leslie,

    I believe the default code can be found on the following page:

    https://docs.miva.com/how-to-guides/...existing-store
    Ahhh, yes. Many thanks!

    Leave a comment:


  • eldon99
    replied
    Leslie,

    I believe the default code can be found on the following page:

    https://docs.miva.com/how-to-guides/...existing-store

    Leave a comment:


  • lesliekirk
    started a topic Code for slugified URI's

    Code for slugified URI's

    Store owner wants to switch from product/category code style links to one that uses the product or category name. To say the least, the slugify code is no longer in the fields. Would someone mind posting what needs to go into those fields, please?

    The request has also been made to include the category name in the URI - I can see where that might get a bit hairy (especially if the product is assigned to more than one category). I need to dig back through my posts because seem to recall I came upon another issue when trying to include the category code for a different URI style. I figure I may run into that issue too trying to use the category name.

Working...
X