number only file names

4 posts by 2 authors in: Forums > CMS Builder
Last Post: December 8, 2008   (RSS)

Re: [nigelparry.net] number only file names

By Dave - December 5, 2008

Nigel, that's an easy one! :)

Just go to Admin > Section Editors > Your Section > Viewer Urls (tab) > Filename Fields

Just blank that out or put in the name of the field you want to use.

You can also hand construct urls to have whatever you want using PHP echo tags. Just make sure the record number if on the very end.

Let me know if you need anything else! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] number only file names

Thanks Dave!

That was super easy.

When you talk about hand constructing PHP echo tags, I guess you mean by inserting echo tags in the templates/generated code and in that space manually constructing a URL out of record numbers and links? Can you give an example?

Or can you add some generic text in this same "Filename Fields" text box in the Section Editor interface?

I'm stuck in the Article Manager way of thinking where you can go into the Publishing Rules and define file names with plain text and then have a field name, eg.

article<num> <ext>

Thanks,

Nigel
_____________________

For more information about Nigel Parry and nigelparry.net
websites please see http://nigelparry.net

nigelparry.net: award-winning communications
solutions for clients with something to say

Website & print design
Internet, public relations & media consulting

Re: [nigelparry.net] number only file names

By Dave - December 8, 2008

You can specify any field you want in the filename field. So you could create a new field "filenameText" and fill that out for each record to have that content appear in the url.

You can also hand craft an url like this:
viewer.php?<?php echo $record['num'] ?>

And put anything else you want in there:
viewer.php?hello-world-<?php echo $record['num'] ?>

And then with .htaccess, mod_rewrite, and other tricks you can drop the .php, and craft just about any kind of urls you want.

The best way to start would be to figure out how you'd like your urls to look and then work backwards from there.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com