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: [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: [rez] url numbers instead of labels

By (Deleted User) - February 3, 2012

Hi rez,

If I've got this right, you're building the link using a list of "num from foreign table"=>"name from foreign table" called "title".

Using just "title" to refer to the field will use the value of that field (in this case, 'num from foreign table') - cmsb uses pseudo-fields to show the label for a value when referring to another table.

You can use this pseudo field in the viewer settings by calling "title:label" which will refer to the label of the value instead of the value itself.

Pseudo fields can also be used for the general viewers.

Let me know if this helps,

Tom

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