Login Page

Permalink Browser Info Environment
How is it possible to adapt the login page to the theme. Adding
<?php
return array(
    'theme_paths'         => array(
        '/login'            => 'modena'
    ),
);

to the
application/config/app.php
doesn't do the trick (completely). Because the header is missing.

Type: Ticket
Status: In Progress
davidstein
View Replies:
VidalThemes replied on at Permalink Reply
VidalThemes
Hi David,

Thanks for your purchase.

I believe that method uses view.php, you could duplicate view.php rename it to login.php and include the header and footer as you would in a normal page template, that route should then pick up the login page. I have to admit I am no expert on this, so if that does not work it may be worth asking in the general forum.

Best regards

David
davidstein replied on at Permalink Reply
davidstein
Hi David,

thank you very much for your prompt reply! And by the way, I realy love your Modena-Theme.
Duplicating view.php and using it as login.php (with added header) unfortunately does not work. The login module is then no longer included. But what worked is to add the normal header to view.php. Does the view.php have a special meaning and should therefore not be changed? Or can I use this workaround without any problems?

best regards
VidalThemes replied on at Permalink Reply
VidalThemes
Hi David,

Not a problem, and it's good to hear you are enjoying Modena.

It really depends on what add-ons you want to use as some of them may use view.php as its a wrapper for single pages, if there is a clash at all you may be able to write some conditional code to negate the issue, I found this thread in the forumhttps://archive.concretecms.org/community/forums/customizing_c5/sing... its a bit out of date now but I think some of the ideas will still be applicable, please let me know what you think.

Best regards

David
davidstein replied on at Permalink Reply
davidstein
Hi,

good idea! I changed the original view.php:
<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
<?php $this->inc('elements/sub-page-header.php'); ?>
<section>
    <?php print $innerContent; ?>
</section>
<?php $this->inc('elements/footer.php'); ?>


to:

<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
<?php $this->inc('elements/sub-page-header.php'); ?>
<?php if($c->getAttribute('disable_sub_page_banner') == true) : ?>
    <div class="hero-unit__spacer"></div>
<?php else : ?>
<div class="hero-unit-sub-page margin-bottom-100">
    <div class="hero-unit-sub-page--overlay"></div>
    <div class="hero-unit-sub-page__content">
        <div class="grid-row">
            <div class="column-12 animated-parent animation-delay-1000">
                <h2 class="animated animate__fade-in-down-short go">
                    <?php if ($c->getAttribute('disable_sub_page_name') == false) {
                        $page = Page::getCurrentPage();
                        echo $page->getCollectionName();
                    } ?>


so if a single-page needs the view.php without the header, it can be set with the "Disable Sub Page Banner" Attribute. Thank you for your help!

Best regards

David
VidalThemes replied on at Permalink Reply
VidalThemes
Hi David,

No problem, glad you found a solution.

Best regards

David

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.5
Version Installed - 8.5.5
Database Version - 20201116182100

# Database Information
Version: 5.7.34-nmm1-log
SQL Mode: NO_ENGINE_SUBSTITUTION

# concrete5 Packages
Modena Theme (1.1.7)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
7.3.30-nmm1

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gender, gettext, gmp, hash, htscanner, http, iconv, imagick, imap, interbase, intl, ionCube Loader, json, ldap, libxml, mailparse, mbstring, mongodb, mysqli, mysqlnd, OAuth, odbc, openssl, pcre, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, propro, pspell, raphf, recode, Reflection, session, shmop, SimpleXML, soap, sodium, SourceGuardian, SPL, sqlite3, standard, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 3000
memory_limit - 256M
post_max_size - 200M
upload_max_filesize - 200M
ibase.max_links - Unlimited
ibase.max_persistent - Unlimited
ic24.api.max_timeout - 7
ldap.max_links - Unlimited
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
raphf.persistent_handle.limit - -1
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.52

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.