Hide VIEW POSTS button if none exist in the WIKI

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#1406 (In Topic #298)
Avatar
Standard member
ironfeather is in the usergroup ‘Well-settled’
Edit template: templates/WIKI_PAGE_SCREEN.tpl




<!–  stevyn edit to hide posts –>
{+START,IF_NON_EMPTY,{POSTS}}
<!–  stevyn edit to hide posts –>

   {+START,IF,{$AND,{$NOT,{$PREG_MATCH,(^|&|\?)te\_\d+=1,{$QUERY_STRING}}},{HIDE_POSTS}}}
      <div>
         <p class="toggleable_tray_title">
            <a class="toggleable_tray_button" title="{!DISCUSSION}: {!EXPAND}/{!CONTRACT}" href="#" onclick="return toggleable_tray('hidden_posts');"><img alt="{!EXPAND}: {!DISCUSSION}" title="{!EXPAND}" src="https://compo.sr/themes/composr_homesite/images/1x/trays/expand.png" srcset="https://compo.sr/themes/composr_homesite/images/2x/trays/expand.png 2x" /></a>
            <a class="toggleable_tray_button" title="{!DISCUSSION}: {!EXPAND}/{!CONTRACT}" href="#" onclick="return toggleable_tray('hidden_posts');">{!DISCUSSION}</a> ({!POST_PLU,{NUM_POSTS*}})
         </p>
         <div class="toggleable_tray" id="hidden_posts" style="display: {$JS_ON,none,block}" aria-expanded="false">
   {+END}

   {+START,IF_EMPTY,{POSTS}}
      <p class="nothing_here">{!NO_POSTS}</p>
   {+END}
   {+START,IF_NON_EMPTY,{POSTS}}
      <div class="wide_table_wrap"><div class="map_table results_table wide_table cns_topic wiki_table">
         <div>
            {POSTS}
         </div>
      </div></div>
   {+END}

   {+START,IF,{$AND,{$NOT,{$PREG_MATCH,(^|&|\?)te\_\d+=1,{$QUERY_STRING}}},{HIDE_POSTS}}}
         </div>
      </div>
   {+END}
<!–  stevyn edit to hide posts –>
{+END}
<!–  stevyn edit to hide posts –>

———–
Publisher of IronFeather Journal since 1987.  Host of KGNU Colorado Radio for 20 years. 
Currently in Japan & decided to focus on Composr as my number one CMS.
Composr site for community of Hokkaido:  Nandalow.com
Composr site for my freelance work: Futurecode.jp
My Compsr edits : 
http://ironfeather.com/bbs/viewtopic.php?f=12&t=2862
Twitter: https://twitter.com/futurecodejp

 
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#1410
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Nice change :). We'll do something similar for the next RC.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#1470
Avatar
Standard member
lg11 is in the usergroup ‘Well-settled’
Are there any courses i can take for coding things like this? I can code microcontrollers in C (slightly rusty though).

but have never written any code for the web or pc.
Online now: No Back to the top

Post

Posted
Rating:
#1479
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
This is a pretty complex template. In fact, over-complex, as part of it referenced a feature we dropped in v10, so I cleaned it up when I saw this.

Our "Tempcode Programming" tutorial shows all the syntax for Tempcode:
Composr Tutorial: Tempcode programming - Composr
Otherwise it's pretty normal HTML with a little CSS and JavaScript mixed in. I suppose the key to it not looking a complete mess is to mentally separate the Tempcode (the bits between {…}) from the HTML.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#1501
Avatar
Standard member
lg11 is in the usergroup ‘Well-settled’
Ok great, so i got to learn HTML,CSS,Temp code and Java.

Ok books ordered and temp code tutorial will be gone through after the roll out. Or in the little specks of free time i get.

Thanks for the info, I take early semi retirement in a few weeks, i might get a few hours each week to have a go at learning some of this stuff. Its the one upside of an insomniac who gets bored with nothing to do :D.
Online now: No Back to the top

Post

Posted
Rating:
#1504
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hopefully you bought a JavaScript book, not a Java one. That's a common misunderstanding.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#1513
Avatar
Standard member
lg11 is in the usergroup ‘Well-settled’

Chris Graham said

Hopefully you bought a JavaScript book, not a Java one. That's a common misunderstanding.
:$:$ Back on Amazon then :$:$
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

MVLipwig, deepu_ms, ManojSree, Manu, John Connor, Paul D

Forum statistics:
  • 1,296 topics, 5,829 posts, 7,064 members
  • Our newest member is flour2door
Birthdays:
Back to Top