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.

Fresh Variables

November 21, 2007 10:20am

Subscribe [24]
  • #46 / Jan 25, 2008 7:01pm

    oldgoldblack

    113 posts

    So Derek…I could use a field from a weblog (weblog:entries tag) as a variable, then use that variable as a parameter in a reverse-related entries tag? Can’t currently do that (well maybe with an embed) because of parse order, the related entries are parsed before the weblog:entries tag.

    I’m wondering the same thing, because I have the exact same problems, have not gotten embeds to work yet. So far creativity in reverse-related = disaster. A few minutes of fiddling with this module hasn’t done me any good either, but I’m basically an EE novice.

    Anyone know the answer? Could this help reverse-related related dilemmas?

  • #47 / Jan 25, 2008 9:54pm

    Derek Jones

    7561 posts

    @Kevin: do you have an active thread in the How To forum for your specific issue?  As I told Randy (PXLated), no, you cannot use Fresh Variables this way.

    @dekalog6: You must be using the Multiple Site Manager to gain this functionality.

  • #48 / Jan 27, 2008 4:50pm

    oldgoldblack

    113 posts

    Woops, sorry Derek, missed that answer in this looong thread. No How To forum yet. If I get back to work Monday and still can’t get a workaround going, I’ll post then.

    This is a great plugin, even though I can’t use it today. Thanks!

  • #49 / Jun 05, 2008 3:55pm

    ruraldreams

    279 posts

    I’m trying to put a url_segment variable in a Fresh Variable.  Should this work?

    <span class="edit_link"> <a href="/{segment_1}/edit/{entry_id}">edit this</a></span>

    segment_1 isn’t reading the url segment

  • #50 / Jun 05, 2008 3:57pm

    Ingmar

    29245 posts

    I don’t think that’ll work, no. URL segments are parsed very early on. I have solved a similar issue with a sub-template and embedded variables.

  • #51 / Jun 05, 2008 4:00pm

    Derek Jones

    7561 posts

    Ingmar is correct, Fresh Variables are parsed at the same time as path.php globals, which is just after segment variables and embed variables.

  • #52 / Jun 05, 2008 4:04pm

    ruraldreams

    279 posts

    Thanks for the quick answer!  I’ll stop banging my head on the desk.

  • #53 / Jul 10, 2008 10:42am

    tpayton

    172 posts

    Can you clarify. To put PHP in a fresh variable, do you need to enable PHP on the template?

    I can’t seem to get any PHP to work.

  • #54 / Jul 10, 2008 11:10am

    Derek Jones

    7561 posts

    Yes, Fresh Variables do not allow you to circumvent the PHP parsing preferences of the template, so the template would have to be set to parse PHP.

  • #55 / Aug 15, 2008 4:28pm

    Ian Cook

    93 posts

    Sorry to reawaken this old thread, but ...

    I’m having some trouble getting Fresh Variables to work on my Multiple-Site Enabled install of EE.

    I’ve performed the instructions in the docs ( twice to verify ), I’ve enabled the module, added variables, added variable names to my templates, and…... nothing.

    I’ve verified that globals can be set and retrieved through each site’s path.php, but neither site will retrieve Fresh Variables.

    I created a test template containing only the variable:

    {current_issue}

    .. which I set in Fresh Variables:
    ( brackets simulate input boxes 😊 )

    [ current_issue ]    [   123   ]

    .. but when reloading the test page, the output is just the variable name, as entered in the template:

    {current_issue}

    I enabled template debugging output:

    TEMPLATE DEBUGGING
    (0.000036) - Begin Template Processing - 
    (0.000405) URI: /site/test/
    (0.000438) Path.php Template: /
    (0.000477) Retrieving Template
    (0.000514) Parsing Template URI
    (0.002997) Determined Template: site/test
    (0.003068) Retrieving Template from Database: site/test
    (0.005551) Template Found
    (0.006524) Template Type: webpage
    (0.006824) Parsing Site Variables
    (0.006949) Global Path.php Variables (Keys): site_id|site_label|site_short_name
    (0.006988) Global Path.php Variables (Values): 2|2|2
    (0.007119) Parse Date Format String Constants
    (0.007181) Parse Current Time Variables
    (0.007236) Parsing Segment, Embed, and Global Vars Conditionals
    (0.008029) - Beginning Tag Processing - 
    (0.008075) - End Tag Processing - 
    (0.008172) - End Template Processing - 
    (0.008202) Parse Global Variables
    (0.010632) Template Parsing Finished
    Memory Usage: 3,222,068 bytes

    ... nothing obvious about Fresh Variables there. Seems like it’s just not getting enabled, even though it says it is in the Modules list.

    I’ve tested this for both sites managed via this EE install, same result.

    Any ideas?

    Thanks,

    Ian

  • #56 / Aug 15, 2008 4:39pm

    Derek Jones

    7561 posts

    What other extensions do you have installed, Ian?

  • #57 / Aug 15, 2008 4:40pm

    Derek Jones

    7561 posts

    Oh, and are you creating Fresh Variables for the site you are trying to use them in?

  • #58 / Aug 15, 2008 4:43pm

    Ian Cook

    93 posts

    Pasted below is the complete list from the Modules page.

    The only modules installed beyond the default would be the Discussion Forum.

    ( fyi, ‘weblog’ term renamed to ‘collection’ )

    —-

    Module Name     Description     Version     Status     Action
    1     Blacklist/Whitelist     Blacklist and whitelist module     --     Not Installed     Install
    2     Blogger API     Blogger API Module     --     Not Installed     Install
    3     Comment     User commenting system     1.2     Installed     Remove
    4     Email     User Email Module     --     Not Installed     Install
    5     Emoticon     Emoticon (smiley) module     1.0     Installed     Remove
    6     Discussion Forum     Discussion Forum Module     2.1.0     Installed     Remove
    7     Fresh Variables     Control Panel managed early-parsed global template variables     1.0     Installed     Remove
    8     Photo Gallery     Photo Gallery Module     --     Not Installed     Install
    9     IP to Nation     Utility for associating IP addresses with their country     --     Not Installed     Install
    10     Mailing List     Mailing List Manager     2.0     Installed     Remove
    11     Member     Member management system     1.3     Installed     Remove
    12     Metaweblog API     Metaweblog API Module     --     Not Installed     Install
    13     Moblog     Moblogging Module     --     Not Installed     Install
    14     Pages     Uses Collection Entries to make Static pages     --     Not Installed     Install
    15     Query     SQL query module for templates     1.0     Installed     Remove
    16     Referrer     Referrer tracking module     1.3     Installed     Remove
    17     RSS     RSS page generating module     1.0     Installed     Remove
    18     Search     Search module     1.2     Installed     Remove
    19     Simple Commerce     Simple, Flexible Commerce Module     --     Not Installed     Install
    20     Statistics     Statistics display module     1.0     Installed     Remove
    21     Trackback     Trackback module     1.1     Installed     Remove
    22     Updated Sites     Allows other sites to ping you.     --     Not Installed     Install
    23     Collection     Collection module     1.2     Installed     Remove
    24     Wiki     A Powerful, Integrated Wiki module     --     Not Installed     Install
  • #59 / Aug 15, 2008 4:44pm

    Ian Cook

    93 posts

    I’ve tried all permutations of site specification.

    I’ve tried making them site-specific for the current site, global, site specific for one and then tried to use in the other, etc etc.

  • #60 / Aug 15, 2008 4:48pm

    Derek Jones

    7561 posts

    What about your extensions, Ian?

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

ExpressionEngine News!

#eecms, #events, #releases