url numbers instead of labels

6 posts by 2 authors in: Forums > CMS Builder
Last Post: February 6, 2012   (RSS)

By rez - February 3, 2012

the titles to projects in my cmsb are list fields coming from another table.

unfortunately, this is making my urls numbers instead of the labels. Is there a way to use the labels for the urls? i dont want to have to make a redundant field.


thanks for the help.

Re: [rez] url numbers instead of labels

By (Deleted User) - February 3, 2012

Hi rez,

The viewer and detail pages for a table can be set in Admin->Section Editors->TABLE->Viewer Urls - once set here the link to a record from that table can be set with $record['_link'] which will automatically add the appropriate record number to the end of a link.

To add a more detailed name (in this case, the title of a record), set Filename Fields to 'title' - this will set the url to "viewerPage.php?Title-Taken-From-Title-Field-120" where "120" is the record number.

Let me know if this helps,

Tom

Re: [Tom P] url numbers instead of labels

By rez - February 3, 2012

That is the setup I'm using. Unfortunately, that title field is populated from another table using num for value and label for name.

The "viewerPage.php?Title-Taken-From-Title-Field-120

Looks like
"viewerPage.php?52-120

Not very friendly. I have to use num. How can use the label in the link instead of num?

Thanks

Re: [Tom P] url numbers instead of labels

By rez - February 4, 2012

The viewer works great with label. My problem is the url. Can I use the label in the url? I want the title in the url. Currently it is showing the num. I need a friendly url.

If I could put title:label in the viewer url section of cmsb admin, that would be great but doesn't seems to work.

Re: [rez] url numbers instead of labels

By (Deleted User) - February 6, 2012

Hi rez,

You're right, the :label isn't handled correctly by the viewer url field! My mistake.

This functionality could be added with a plugin.

If anyone has written one that already does this, please let us know!

Otherwise we'd have to look at building a custom plugin.

Tom