Forum
Member Tags not hiding content
Hi there,
I am running the latest version of Perch and it seems the member template tags in templates are showing content. You can see i have a member tag wrapping around a download link but when logged out it is showing the tag.
Regards
<perch:help>
<p>Maximum image on brand content pages size is 838px wide (DO NOT EXCEED THIS)</p>
</perch:help>
<perch:before>
<ul class="uk-list uk-margin-large-top uk-margin-large-bottom">
</perch:before>
<h1><perch:content id="brandheading" type="text" label="Brand Heading" required="true" title="true" /></h1>
<perch:content id="text" type="textarea" label="Brand Conent" html="true" editor="redactor" bucket="resources" imagewidth="838"/>
<perch:repeater id="files" label="PDF Files">
<perch:member has-tag="staff">
<li><p><i class="uk-icon-download"></i> <a class=" uk-margin-small uk-button print" href="<perch:content id="file" type="file" label="File" bucket="pdfdocs" />">
<perch:content id="link-title" type="text" label="Link Title" required="true" title="true" />
</a></p> <perch:else:member />
To access the print ready download link please login.
</perch:member></perch:repeater></li>
<perch:after>
</ul>
</perch:after>
<hr>
Do you have the Members app installed?
How are you displaying the template?
Hi Drew,
Members is installed, latest version.
Page as follows:
Regards
Is this the
Brand Page
region? If so, switch toperch_content_custom()
.Hi Drew,
Thank you very much.
That worked, may I know the reason content custom was required?
Regards
perch_content()
renders the template at edit time and stores the resulting HTML. Your user is not present or logged in at that point, so the members tags don't work.You need to render the template live so that the current member can be taken into account.
Perfect, Drew.
Thank you for your explanation :)