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.

Global variable wont work as tag parameter

September 09, 2010 5:39pm

Subscribe [3]
  • #1 / Sep 09, 2010 5:39pm

    adrake9

    57 posts

    Trying to figure this out

    is it possible to do the following in the entries parameters.

    search:custom_field="{logged_in_user_id}"

    when i use:

    search:custom_field="1"

    I get exactly what i want, but I need it to be dynamic, based on whatever user is logged in.

    In the documentation I believe it says that Global Variables can be used anywhere in the template. but this doesn’t seem to work here. any insight is appreciated.
    -a

  • #2 / Sep 10, 2010 11:28am

    insiteadvice

    68 posts

    Have you tried removing the curly braces?

    search:custom_field="logged_in_user_id"
  • #3 / Sep 11, 2010 9:49am

    Boyink!

    5011 posts

    Try “CURRENT_USER”

    Search:custom_field="{CURRENT_USER}"
  • #4 / Sep 11, 2010 9:28pm

    adrake9

    57 posts

    thanks guys for all your help. In order to use the logged_in variables i had to use a little php. but the CURRENT_USER would do exactly what I need. didn’t even think about it. Again, thanks!
    -a

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

ExpressionEngine News!

#eecms, #events, #releases