how can i put a hero image in my application to only be displayed in my main url and does not be displayed in other urls?
Sure, why not?
If you want to know how to do that, than show what you have now.
i have my two controllers and i want when user inters main url which is localhost/karbag/
an image be displayed in all around the page but when user go to another url like localhost/karbag/posts/add, then the image does not be displayed again.
i’m using default.ctp, when i place it in default.ctp it is displayed in every url and when i place the div in index.ctp that is for my main rout, it’s not working at all
If it displays via default.ctp it should work the same way in index.ctp. Share here your index.ctp with the image.
thank you for your time
it’s not working in index.ctp because in default.ctp i have things to be displayed above the div for content which comes from index.ctp
in default.ctp i display content from index.ctp using the following code.
<?= $this->Flash->render() ?> <?php echo $this->fetch('content'); ?>
problem solved<?php $host = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; if($host == 'localhost/karbag/'): ?>
کار یا کارمند احتیاج دارید؟
می خواهید بخرید یا بفروشید؟
$this->request has variables to do that too.