ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Customize How EE Prevents URL Title Collisions

December 07, 2012 11:34am

Subscribe [1]
  • #1 / Dec 07, 2012 11:34am

    grovberg

    50 posts

    Short Version: Can I customize how EE handles URL Title collisions? Right now it just adds a number. So

    “sample_title” “sample_title1” “sample_title2”

    I’d rather have it do something like

    “sample_title” “sample_title-1” “sample_title-2”

    Any idea how I can make that happen?


    Backstory In Case There’s Another Workaround: We offer workshops throughout the year. I have one channel that stores the info about the workshop (title, description, objectives, etc…). I then have another channel that stores an entry for each time the workshop will be held. So if workshop “A” is offered three times, there’s one entry in the first channel for the workshop as a whole, and three entries in that second channel for each session to show on the calendar, all with the same title. Right now there’s no formal database relationship between the two channels, but I use the title in the template to group them together.

    Essentially, you only ever see the sessions in the context of the workshop as a whole or on the calendar. And when you click on a session link in the calendar, I want you to see the entry from the info channel. So the link URL for all three sessions just points to the info entry with the same title, ignoring any trailing numbers so that they all point to the same info entry. This worked well until we created a workshop called “Sample Title 101.” Anything I can figure out to do for the subsequent sessions—called “Sample Title 1011” and “Sample Title 1012”—strips out too many numbers. That’s why I’m wondering if I can add a delimiter of some kind in there so I’ll have some basis for adjusting my url titles in the template.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases