Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Tokens driving me mad

Featured Replies

I have a problem understanding tokens and was wondering whether anybody could demystify this technique for me.

I am passing the following url,

FMPro?-db=contentindex.fp5&-lay=table&-format=channelhome.htm&pubdateconf=1&sitechannelid=1&-sortfield=pubdate&-sortorder=ascending&-max=10&-find

to access a set of records that are returned between the FMP-record tags shown below.

[fmp-record][FMP-if:contenttypeid.eq.1]<A href="[FMP-linkrecid:Format=channeleditorial.htm]">[fmp-field:headline]<br></a>[/fmp-if][/fmp-record]

You'll see that I'm using the dynamic FMP-linkrecid as I wish to access the full record. However, herein lies my problem as it sits in another database called news.fp5. The common link between the two is the contentID. However, when I try to pass this as a token the resulting page doesn't show the record content at all as it is still addressing the contentindex.fp5 contained in the original request.

How do I get it to address the news.fp5 and produce a set of dynamic links for all records returned from the orginal url search?

Any help would be appreciated as I am slowly going mad! Thanks.

Forget using tokens for this purpose. Besides, nowhere in the cdml that you posted is there a command that sets a token.

You need to work on the link that takes people to the next database. The LinkRecID tag is inappropriate here because this CDML tag assumes the records are in the current database. You need the [FMP-Link] tag because it lets you change all of the specifics.

It should be:

[FMP-Link:dra] where d=database , r=format file and a=action

I have had some difficulties getting this Link tag to work correctly. It seems to be particular about the order that things are specified. (Check the page source to see exactly what url it is generating and modify the syntax of the Link tag accordingly.) For instance the syntax:

[FMP-Link:dra]&-db=news.fp5&-channeleditorial.htm&-find

...might not work correctly because the tags aren't in the correct order, but it might. If it doesn't work try this syntax:

-db=news.fp5&-[FMP-Link:dra]&-channeleditorial.htm&-find

All I have done there is recreate the standard url order.

  • Author

Thanks Vaughn that was a great help. As you suggest it is a little tricky to get it to work.

It would seem that the parameters that you wish to exclude from the original URL have to be in the same order as the request that originated the page and the new request. I also noticed early on that FMP was adding in a -Skip parameter which was definately not in my original URL, so to be safe I also excluded everything I wasn't using and ended up with the following:

[fmp-record]

[FMP-if:contenttypeid.eq.1]<A href="[FMP-link:dlrfsktma]-db=news.fp5&-lay=relatedstoriessummary&-format=editorial.htm&contentid=[fmp-field:contentid]&-find">[fmp-field:headline]</a>[/fmp-if]

[/fmp-record]

Including the contentID field in the find meant that I always end up at the correct record in the other database. CurrentRecID would not work as there is no guarantee that the number would be the same across databases.

Thanks for posting back to the Forum with your results.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.