Templates

How can I exclude images when using a particular skin/NP_MyNewsletter?

Scenarios:

  • "I am using NP_MyNewsletter to send out excerpts of my items but I only want subscribers to be able to access images when they visit my site, not through the newsletter."
  • "I don't want any image posted in the item content to show up when I am using a certain skin."

Solution:

  • Create a new template called something like default/headlines (or whatever you want to call it) and just put something like the following into the Item Body field:

    <h2><a href="<%itemlink%>"><%title%></a></h2>
    <%syndicate_description(250)%>
  • Make sure your new default/headlines does not contain any code in the "Inline Image Code" section. The box outlined in red in the image below should be blank:
    Delete the code in the Inline Image Code box.

  • Now in the skin where you don't want images displayed (including the skin you use for NP_MyNewsletter) call your new template using the blog variable like this:
    <%blog(default/headlines,15)%>

Original forum thread (thanks, ftruscot & Leng!):
http://forum.nucleuscms.org/viewtopic.php?t=14458

section: Templates | submitted by Leng on 2006.Dec.06 | 2214 views

item rate
This answer was not rated yet.

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10