Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   [category.slug] in text module (/showthread.php?t=6537)

lesljr March 19th, 2012 09:43 AM

[category.slug] in text module
 
how can i access [category.slug] in a text module?

Eric March 19th, 2012 09:52 AM

Hi

You'll need to use this:
Code:

<?php echo $category->slug; ?>
Eric

lesljr March 19th, 2012 12:32 PM

that worked. how about the current page? I would like to pass the url to a php function

Eric March 19th, 2012 12:46 PM

You can find all of the variables you have access to by adding this code to your view:

<pre><?php print_r($category); ?></pre>

lesljr March 19th, 2012 12:59 PM

here is what it returned. look at http://autotulsablog.com/2011/10/22/...eering-wheels/ on the bottom of the page

dfr_null Object
(
[is_null] => 1
)

Eric March 19th, 2012 01:05 PM

That will only return something IF you are in a category. If there is no category, the $category object will be NULL.

lesljr March 19th, 2012 01:07 PM

yeah, I just noticed that. I changed the variable to $server and it didn't return anything. Is server spelled server or Server?

Eric March 19th, 2012 01:22 PM

It's case insensitive as far as I know.

lesljr March 19th, 2012 01:34 PM

ok. I tried to use $server as a parm and it didn't return anything.

<pre><?php print_r($server); ?></pre>

I tried take [server.url type='fullpage'] and convert to $server->url[fullpage] with no sucess.

lesljr March 19th, 2012 01:42 PM

nevermind, i have a work around


All times are GMT -5. The time now is 01:14 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.