<![CDATA[ Weblogin elements on page - My Forums]]> https://forums.modx.com/thread/?thread=44753 <![CDATA[Re: Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257469
1. Put this code in your template: [!My_PDF_snippet!]

2. Create a snippet with this code:

<?php
$output ="";
if(isset($_SESSION[’webInternalKey’])){
$output .="[*Name_of_your_TV*]";
}
return $output;
?>

3. Create a TV called "Name_of_your_TV" that show’s your pdf files and assign this to the template you want.

Now you can edit a page, on the bottom of the editor you’ll find an option to upload your files.]]>
jevdo Apr 10, 2009, 02:03 AM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257469
<![CDATA[Re: Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257468
[!My_PDF_snippet!]

Also make sure you don’t add the TV itself to the template or page content, just make sure it is assigned to the template you use. The snippet you created needs to be placed where you want the pdf link to appear on the page.

Snippets are also spelling and case sensitive, so make sure the call matches what you named it in the manager.

example: (added to template)
<html>
.../
<body>

  [*content*]
 [!My_PDF_snippet!]

</body>
</html>

]]>
breezer Apr 08, 2009, 07:57 AM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257468
<![CDATA[Re: Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257467 mrhaw Apr 08, 2009, 07:35 AM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257467 <![CDATA[Re: Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257466 Quote from: Breezer at Apr 07, 2009, 05:15 PM

Try this:

Create a Template Variable to hold the pdf image link, make sure you assign it to the template you are using.

Create a snippet with this code and call it on the page where you want the pdf link to appear, changing "Name_of_your_TV" to match the one you created.
<?php
$output ="";
if(isset($_SESSION[’webInternalKey’])){
$output .="[*Name_of_your_TV*]";
}
return $output;
?>

hope this helps smiley

Too bad, that isn’t working..:( Seems logical, but now modx shows the tv also when you’re not logged in...

Quote from: mrhaw at Apr 07, 2009, 05:31 PM

MODx equals Many Options Doing X cool

The PHx Plugin:
[+phx:mo=`myWebgroup`:then=`[*tv*]`:else=``+]


I’ve installed the plugin and copied the code, but it doesn’t do anything...]]>
jevdo Apr 08, 2009, 02:47 AM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257466
<![CDATA[Re: Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257465

The PHx Plugin:
[+phx:mo=`myWebgroup`:then=`[*tv*]`:else=``+]
]]>
mrhaw Apr 07, 2009, 12:31 PM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257465
<![CDATA[Re: Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257464
Create a Template Variable to hold the pdf image link, make sure you assign it to the template you are using.

Create a snippet with this code and call it on the page where you want the pdf link to appear, changing "Name_of_your_TV" to match the one you created.
<?php
$output ="";
if(isset($_SESSION[’webInternalKey’])){
$output .="[*Name_of_your_TV*]";
}
return $output;
?>

hope this helps smiley]]>
breezer Apr 07, 2009, 12:15 PM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257464
<![CDATA[Re: Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257463 jevdo Apr 07, 2009, 09:25 AM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257463 <![CDATA[Re: Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257462 http://modxcms.com/extras.html?view=package/view&repository=10&package=336]]> sjh_vt Apr 05, 2009, 09:25 PM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257462 <![CDATA[Weblogin elements on page]]> https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257461
There are a few productpages on my website (no use of ditto). My client wants to place pdf’s on those pages that can be downloaded by people who are logged in. I know it’s possible to see hidden pages after login, but i can’t figure out if it’s also possible to hide elements on pages that are also visible to everyone.

So when you go to page product 1, you can’t see the pdf.

When you log in, you go to page product 1 and you can see the pdf.

PS. is it also possible to show your last login date after you have logged in?]]>
jevdo Apr 03, 2009, 06:37 AM https://forums.modx.com/thread/44753/weblogin-elements-on-page#dis-post-257461