Embed login block with popup custom template into header.php
Permalink
Hi There,
I'm trying to embed the login block (set to use the login popup template) into header.php but can't get the popup to work.
I couldn't find any way to embed it directly (like autonav) so am trying to do it via a global scrapbook item like this:
Is there a trick to getting it to work with a custom template?
Any help would be most awesome.
Cheers
Ben
I'm trying to embed the login block (set to use the login popup template) into header.php but can't get the popup to work.
I couldn't find any way to embed it directly (like autonav) so am trying to do it via a global scrapbook item like this:
<?php // grab a login block from the global scrapbook $b = Block::getByName('login_block'); $b->display(); ?>
Is there a trick to getting it to work with a custom template?
Any help would be most awesome.
Cheers
Ben
Hmm, am also having a similar issue with the shopping cart although it's not as predictable.
i.e. it works sweet on all pages except three - not sure why
Is this a similar issue to the login popup - do popups not get embeded with global blocks maybe?
i.e. it works sweet on all pages except three - not sure why
Is this a similar issue to the login popup - do popups not get embeded with global blocks maybe?
Because the login popup and cart will appear on every page, I thought I could just add all the js and css to the head of my site manually.
But while this works on pages where the block hasn't been added, on others it causes a conflict because the scripts are loading twice. Also, other blocks like my_easy_tabs no longer work - presumably also because of scripts loading twice.
What would be the best way to manually control the scripts and force c5 to not add extra scripts when a block is added to the page?
Any help would by much appreciated.
Cheers
Ben
But while this works on pages where the block hasn't been added, on others it causes a conflict because the scripts are loading twice. Also, other blocks like my_easy_tabs no longer work - presumably also because of scripts loading twice.
What would be the best way to manually control the scripts and force c5 to not add extra scripts when a block is added to the page?
Any help would by much appreciated.
Cheers
Ben
OK, so removed some obvious double-ups like jquery and the ccm-base files and now both the login and cart popups work on every page - but on some pages I'm loading block dependancies twice.
As above, what would be the best way of removing the double-ups and manually and controlling certain block dependancies?
Any help would be most welcome.
Cheers
Ben
As above, what would be the best way of removing the double-ups and manually and controlling certain block dependancies?
Any help would be most welcome.
Cheers
Ben
Just to be clear, the Login link is displaying and when clicked I see "#login-popup" appended to the URL but the popup and login form doesn't display.