Loading...
 
Features / Usability

Features / Usability


[SOLVED] How can I 'hide' the 'page action' button...

posts: 228 Ukraine

...on just one page - the Homepage?

...or, on say 10 pages with 'Anonymous' permissions to 'view' (e.g. the front facing pages of a website)?

I suspect the only way us 'Custom CSS' - would anyone with CSS knowledge be able to help out?

Thanks,
Mike

posts: 4656 Japan

This may work — use PluginLayout in the page with the actionbuttons parameter set to "n", like

Copy to clipboard
{layout header="y" footer="y" leftcolumn="y" rightcolumn="y" fullwidth="n" nosidemargins="n" bgrepeat="repeat" actionbuttons="n" topbar="y" pagetopbar="y" pagebottombar="y"}


(This is the default content when only the actionbuttons parameter is changed.)

-- Gary

posts: 228 Ukraine

Hi Gary,

I should have provided a screenshot and been more specific - by 'page action' button I meant the single small square button on the top of each page on the right with a little down arrow in it:

Screenshot From 2021 06 29 16 43 19

The bottom page action buttons I typically hide by assigning (object level, e.g. page) permissions - but it's good to know that can be done by Page Layout also.

Thanks,
Mike


posts: 3665 United States

There are probably better solutions, but using the Custom CSS field should work. Maybe:

{QUOTE(thread_id=>77105)}...on just one page - the Homepage?

Copy to clipboard
{if $page eq 'Homepage'} .wikiactions {display:none} {/if}

...or, on say 10 pages with 'Anonymous' permissions to 'view' (e.g. the front facing pages of a website)?


If this means you want to hide it from anonymous (i.e., non-logged in) users, you could use the GROUP plugin:

Copy to clipboard
{GROUP(notgroups="Registered")} .wikiactions {display:none} {GROUP}


But Gary's solution is probably more elegant. :-)

HTH,

- Rick | My Tiki Blog | My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.
posts: 228 Ukraine

Hi Rick,

This one worked:

Copy to clipboard
{if $page eq 'Homepage'} .wikiactions {display:none} {/if}


only a little too good - it removed the page action button on all pages of the site! (tested on two separate sites, separate installations and hostings)

I tried a few variations, just in case:
- 'HomePage'
- '/Homepage' (and '/HomePage')
- and the full URL, starting with 'https...'
- and, I tested with a 'test page' which was not the HomePage
but none worked.

Also, to make sure there wasn't any 'incorrectly coded' CSS in my 'Custom CSS' field, I removed everything there and just added this code, but same result.

It seems something in Tiki is overriding the custom page configuration and applying it everywhere - Bootstrap?

Thanks,
Mike

posts: 3665 United States

Ooopss, sorry. My mistake. You need to use the Custom HTML head content field — not Custom CSS, and my syntax was slightly off. See the note on the configuration page for correct syntax:

Capture

Sorry about that (it is still early here in EST and I haven't had enough coffee yet).


HTH,

- Rick | My Tiki Blog | My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.
posts: 228 Ukraine

Ok, will keep trying - only my site went down! https://agilitynocode.com/HomePage

It's completely locked up, so I'll have to get into the Files, find and delete the code I added into the HTML head.

br,
Mike

posts: 3665 United States

That's what you get for listening to me, sorry!

You can clear the custom HTML from the tiki-preferences table in your DB. Look for custom_html_head_content.

posts: 228 Ukraine

Hi Rick,

I found the file via phpMyAdmin and deleted the code. Though the site still didn't want to work. So I got on the Terminal via cPanel and cleared the cache there, the site started to come alive! At least I could log on and than re-build the index to look good again (Tiki doesn't play well with phpMyAdmin, always have to do an index rebuild after any changes there).

So, now that I know where everything is and how to get it back up to normal, I can test and break it again! (though, maybe first I'll make some back-ups via the 'JetBackup' option in cPanel).

Br,
Mike

posts: 126886 United Kingdom

Rick's Smarty code was close, but if it contains non-smarty curly brackets you need to surround it all in {literal} tags as in the examples under the pref, e.g.

Copy to clipboard
{if $page eq 'Homepage'}{literal} .wikiactions {display:none} {/literal}{/if}

Or you can use plain Custom CSS (safer ;) and target just one page by using it's html.id, like this:

Copy to clipboard
#page_3804 .wikiactions {display:none}

(this is the id of the HomePage here)


posts: 228 Ukraine

Hi Jonny,

I think I did try it with 'literal' tags (after I got my site going again) but don't think it worked still (most likely something else in my code that was incorrect, can't remember now).

In any case, I opened the DOM 'Inspector', found the page number, number 1, applied the safer version in the Custom CSS area and it worked perfect!

Huge thanks Jonny!

Br,
Mike


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting