Forum
Tagged and Untagged User Content is Appearing
Hi,
I'm attempting to utilize tags in an inverted way, by which content unlocks after an expiration date. However, I'm running into a snag. In my HTML template for testing against a tag, it doesn't appear to be working. The content for both tagged and non-tagged users is appearing in the browser. Any help?
<perch:member has-tag="guitar-lesson-2">
<h1>Hey There -This content is locked</h1>
<perch:else:member />
<a href="<perch:content type="text" id="lesson-url-2" label="Link to Lesson Page" divider-before="Lesson 2"/>">
<li>
<div class="vma-circle"><h1></h1></div>
<h2><perch:content type="text" id="lesson-title-2" label="Lesson Title" title="true"/></h2>
<p><perch:content type="textarea" id="lesson-description-2" label="Lesson Description" size="s" help="Provide a 1 sentece description of this video lesson."/></p>
</li>
</a>
</perch:member>
Hi Greg
can we see your Diagnostics report, short version? We need this with each new thread to the forum.
Oh yeah, sorry about not including that.
Which page function are you using to display this template?
Hi,
I'm using this method from an PHP include on the dashboard.php. I've also tried it without using an include.
If you view source, do you see any Perch tags?
Hmmmm.... That's a good question. I've since tried various methods of making this work so my original problem here isn't viewable by the source code anymore. But I know that the adding/removing tags function was working as expected.
I've tried abandoning the HTML and just doing it in PHP like this, but it's still showing content for both tagged and untagged :
I hope that makes sense.
It doesn't much - I can't see how your
if
statement can be both true and false at the same time.Essentially, I'm trying to use the Members Tag backwards. I have a client that wants to drip content weekly relative to the member's sign up date. So I thought I would use the tags with relative expiration dates to essentially hide content until it expires.
If they have a specific tag = echoes no content When the tag expires = echoes content
Perhaps there's an easier way to do this? I just thought this would work.
You might need to check that they're also logged in - otherwise they'll have no tag.
So I'm still not understanding why tags isn't working just "normally"... It works just fine on my dashboard.php, but when I go to call a tag in a html template, it doesn't work. which seems to be my biggest battle.
Using the example on the Perch website, am I able to use <perch:member> and <perch:content> together? If so, for whatever reason this isn't working for me.
Are you still using
perch_content()
or have you switched toperch_content_custom()
?Okay, so I'm in an entirely new project and I'm still having problems understanding why my perch HTML template will not compute something like this.
Both the tagged and untagged information is appearing. I've done this a million times in other projects with the PHP option -what am I missing for the HTML not to work?
I've created a region from PHP in the following code, and I'm including the <perch:member> tags within the news.html
Any help would be appreciated. Thanks
Does it make a difference if you use
perch_content_custom()
?That did it! Not sure how I missed this. Thank you so much.