Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-28-2007, 07:28 PM
New Pligger
 
Join Date: May 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Pass a Variable to story_center.tpl?

I am using Pligg 9.5 with the yget template.

I am successfully using an if/else statement to insert particular HTML code based on the category in link_summary.tpl. The variable is $link_category.

But when I try to use this same code in story_center.tpl (to add a different bit of HTML, specific to each category), I get nothing. It looks as if the $link_category variable is not being passed to story_center.tpl, since it normally has no need for it.

Is there a way to pass it, so that I can append a bit of category-specific code to each news story page?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 07-28-2007, 07:51 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Typically the .tpl files use smarty/php variables from a particular .php file. For example, story_center.tpl uses story.php and link_summary.tpl uses link.php. It sounds like you're trying to use $link_category in a file that's not inheriting link.php (because that's where it's defined).
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #3 (permalink)  
Old 07-28-2007, 09:18 PM
New Pligger
 
Join Date: May 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Yeah, that's definitely my guess. Is there any way to "load" or require link.php variables in story_center.tpl, so that I can use $link_category there?
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
submit extra fields variable problem. baikuken Bug Report 7 08-19-2008 10:08 PM
Why verify a variable is not null if you just set it as null? davemackey Customization Assistance 2 05-06-2008 05:28 PM
how to pass variable from releated story to featured story? jackyu General Help 1 03-01-2008 06:20 AM
Count in tpl files and assigning variable surender General Help 0 01-18-2008 08:46 AM
smarty variable modifiers rebel Bug Report 3 07-30-2007 10:21 AM


Search Engine Friendly URLs by vBSEO 3.2.0