Jump to content
ridgedale

PW3 - Content to be Hidden

Recommended Posts

Reference: PW 3.0.62 and uikit3 based site using the Regular-Master profile.

I have a table that needs some of its content to be hidden. I've tried applying the following classes and styles to <tr>, <td> and <a> elements all without success:

  • class="hidden"
  • class="uk-hidden"
  • class="uk-invisible"
  • style="display:none"
  • style="visibility:none"
  • style="visibility:collapse" <-- only applicable to rows in this case
  • Is there any way to allow a user to hide content?

Any assistance would be appreciated.

Share this post


Link to post
Share on other sites

Are you trying to hide the contents on the front-end or the back-end? Without being able to actually look at the site in question or the code, I can not really help. I would check your inspector and see what properties are being applied to the content. This will help you out in case you need to add !important (I hate using them) due to the framework.

  • Like 2

Share this post


Link to post
Share on other sites
8 minutes ago, louisstephens said:

add !important (I hate using them)

In our dev team, for each !important anyone uses in his code, he/she has to donate 5 bucks and stand in the corner for an hour, deeply ashamed.

But back to the topic at hand: You should be able to inspect and see if all these framework-classes are actually there in your CSS. Are you compiling from SASS? Perhaps there's a helper/utility .scss that you don't include.

7 hours ago, ridgedale said:

style="display:none"

this, however sounds strange. You really should give us more background infos about the big picture.

  • Like 3
  • Haha 1

Share this post


Link to post
Share on other sites

Hi louisstephens and dragan,

Apologies for the very belated response and thank you for your replies.

I wanted to be able to prevent the content from being displayed but keep the content on the page so it could be easily displayed at a later date when required without removing it. In the end I decided it might cause too much confusion with site editors, so I removed the content after creating a backup.

On 5/8/2018 at 7:34 PM, dragan said:

 Are you compiling from SASS?

No, I'm not.

On 5/8/2018 at 7:34 PM, dragan said:

this, however sounds strange. You really should give us more background infos about the big picture. 

Apologies again. I'll bear that in mind in future.

Thanks again to you both.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Peter Knight
      Hi guys
      Is it possible to have a PW site display content from another PW site?
      I've been reading about ProcessWire's Multi-site options and I don't think either is a way forward for me.
      Both PW sites are separate installs with separate databases but crucially they are on the same VPS. So I'm hoping that's a good thing.
      Basically, Site A has approx 100 reviews consisting of these fields
      Reviewer name Review Date Instead of setting up the fields onto Site B and duplicating work and creating 100 pages, I want to *somehow* get site B to use a selector to fetch the necessary content from Site A.
      In future, if I need to update the reviews, I can goto the 'source' Site A to do this.
       
    • By Arunesh Dutta
      Hello all
      I am newbie.Wanted to know does processwire will allow to display external website content and other sources to my website using API powered by processwire
    • By ridgedale
      Reference: PW 3.0.111 and uikit3 based site using the Regular-Master profile.
      Despite my searches of the forum I'm somewhat confused about how to create new child pages on the frontend when a user clicks on a button on the parent page. I also have an equivalent button that is intended for uploading a .csv file to automatically create multiple new pages. This basically relates to a club (parent) and members (child) template configuration. Hopefully this explanation makes sense.
      A button should be able to launch the code needed to initiate the script required to create a new page using something like:
      <a href="/path/page.php">New +</a> <a href="/path/page.php">New ++</a> Does the code to create the new page or new pages need to be run from the template file for the child or the parent?
      A new individual member page will need to be editable manually at the point of page creation as well as subsequently, whereas multiple new pages will need to be editable after they have created and populated with data, again, as well as subsequently.
      I would very grateful for any advice or pointers as to how to achieve this.
       
    • By ridgedale
      Reference: PW 3.0.111 and uikit3 based site using the Regular-Master profile.
      I was wondering if there is a way to restrict user navigation to specific pages.
      Login (home.php - not to be displayed)
          |__  About (not to be displayed)
          |__  Clubs (not to be displayed)
          |            |__ Club (to be displayed)
          |                       |__  Club Members (to be displayed)
          |__ League (not to be displayed)
          |            |__Season (not to be displayed)
          |                       |__  Match (not to be displayed)
          |__  News (blog.php -  to be displayed)
          |
      etc, etc
      Based on the above the navigation needs to appear simply as:
      ---------------------------------------------------------------------------
                           Club    Club Members    News    
      ---------------------------------------------------------------------------
      Any thoughts appreciated.
    • By ridgedale
      Reference: PW 3.0.111 and uikit3 based site using the Regular-Master profile.
      I am trying to create a process whereby when a user logs in to their profile page (the user is automatically redirected to their profile page on login) and they then go to their 'members' page and creates a child page ('club-member'), the data stored in the user template ($user->usercode) is automatically added to the equivalent field on the club-member page.  This will be applicable only to the template used for the 'club-member' pages. Once the new page has been created the equivalent 'usercode' field on the 'club-member' page should not be subsequently editable.
      Below is the page hierarchy for visual reference:
      Login (home)
          |__  profile
                      |__  members
                                     |__  club-members
      It seems like an AddHookBefore might be the solution here such as:
      wire()->addHookBefore("Pages::saveReady", function($event) { $page = $event->arguments(0); if($page->template == 'club-member') { $clubcode = $user->club_code; $field = $page->club_code; $field->set('value', $clubcode); } }); I am I on the right track or is there a better way to achieve this?
      Any thoughts appreciated.
×
×
  • Create New...