Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2018-04-19, 12:30 PM   #1
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,705
Send a message via ICQ to Greenguy
TGPX Question: How The Hell To I Automatically Insert The Category's Name Into The HTML??

I assumed this would work:
{$category.name|htmlspecialchars}

But obviously I'm dumb. I have the feeling I'm missing something like maybe coding that needs to be added to the top of the page so that it works, but fuck me if I can find it

Can anyone tell me WTF I'm doing wrong? Or show me an example of it in action?

Thank you
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote
Old 2018-04-19, 12:50 PM   #2
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,705
Send a message via ICQ to Greenguy
Nevermind

{$page_category.name|htmlspecialchars}

(leaving this here as yet another example of my stupidity)
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote
Old 2018-04-19, 12:59 PM   #3
Toby
Lonewolf Internet Sales
 
Toby's Avatar
 
Join Date: Mar 2005
Location: Houston
Posts: 4,826
Send a message via ICQ to Toby
I'm not aware of a template variable that displays the current category value.
Toby is offline   Reply With Quote
Old 2018-04-19, 01:14 PM   #4
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,705
Send a message via ICQ to Greenguy
When you Add TGP Page, if you assign it a category, the name of that category will be inserted anytime it sees:
{$page_category.name|htmlspecialchars}

I just tried it on the Porn Luv Amateur category page & it works.

So this:
<title>{$page_category.name|htmlspecialchars} Porn Luv</title>
Becomes this:
<title>Amateur Porn Luv</title>

This:
<meta name="description" content="Porn Luv provides you with daily NSFW {$page_category.name|htmlspecialchars} picture and movie galleries.">
Becomes this:
<meta name="description" content="Porn Luv provides you with daily NSFW Amateur picture and movie galleries.">

...and so on.

I didn't try this:
category={$page_category.name|htmlspecialchars}
Because I actually knew that:
category=MIXED
Would be ok since I assigned the page a category & TGPX automatically changes it to that category.

Of course, I just for a good hour or so trying to figure out why {$category.name|htmlspecialchars} wouldn't work, which is what we use for the category lists on all the pages.

I'm too embarrassed to tell anyone how I realized my mistake.
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote
Old 2018-04-19, 11:44 PM   #5
sarettah
Asleep at the switch? I wasn't asleep, I was drunk
 
Join Date: Apr 2005
Posts: 214
Quote:
Originally Posted by Greenguy View Post
I'm too embarrassed to tell anyone how I realized my mistake.
Don't waste time being embarrassed dammit.

You got it figured out, so you learned something. +1 for Greenguy today, ya know?

I have spent countless hours searching code for an issue only to find it being one misplaced parentheses or some other programming 101 error and I have been doing this shit for over 30 years.

You have figured out a whole mess of stuff this week. Kudos to you
sarettah is offline   Reply With Quote
Old 2018-04-20, 05:48 AM   #6
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,705
Send a message via ICQ to Greenguy
Quote:
Originally Posted by sarettah View Post
You have figured out a whole mess of stuff this week. Kudos to you
Thanks I'm not gonna say I didn't need that
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:24 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc