Skip to main content

how to dynamically change favicon in dokuwiki argon template?

 Put <link href="lib/tpl/argon/apple-touch-icon.png?v=<?php echo rand() ?>"> and <link href="lib/tpl/argon/favicon.ico?v=<?php echo rand() ?>"> in if statement and <link href="lib/tpl/argon/images/apple-touch-icon.png?v=<?php echo rand() ?>"> and <link href="lib/tpl/argon/images/favicon.ico?v=<?php echo rand() ?>"> in else if statement. Note: the images should be in 48*48 size.


Note: ?v=<?php echo rand() ?> is for busting the cache for favicon alone.

Note: You should comment out this block of php code:

echo tpl_favicon(array(

'favicon',

'mobile',

))

Comments

Popular posts from this blog

Steps for selenium testing with pytest, in windows 10 and windows 11

1) Download and Install python. (Don't forget to check the box next to "Add Python to PATH). Then click on "Install Now". After installation click on "Disable path length limit". Then click "close". 2) Install pip  Open command prompt and enter the following command: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py Press Enter. If you are in C:\Users\vipin> location in command prompt, then this file will be downloaded to that place. Cut and paste the get-pip.py file to the python directory(C:\Users\vipin\AppData\Local\Programs\Python\Python310\). Change the current path of the directory in the command line, to the path of the directory where the above file exists. This is done by executing the following command in the command prompt : cd /users/vipin/appdata/local/programs/python/python310 Press Enter. Run the command given below: python get-pip.py Press Enter. and wait through the installation process. 3) Install pytest pip install -U p...