php_simple_block and the include('page')
Permalink
Hi all,
Been round and round and still getting an error in the block. Downloaded the php simple block and installed. Attempting to use
<?php include('page.php') ?> in the php simple block to call a menu page from my template directory.
According the the post with php simple block, I do not use the <?php and ?> tags, just what would be included between them.
So far:
include ('page.php') or using ""
inc ('page.php') or using ""
breaks it.
I'm grateful for any help given as I am really wanting to get this to work without copying my menu block to scrap book, because if / when it changes, I have to redo the block on each page, every time.
Thanks again!
Been round and round and still getting an error in the block. Downloaded the php simple block and installed. Attempting to use
<?php include('page.php') ?> in the php simple block to call a menu page from my template directory.
According the the post with php simple block, I do not use the <?php and ?> tags, just what would be included between them.
So far:
include ('page.php') or using ""
inc ('page.php') or using ""
breaks it.
I'm grateful for any help given as I am really wanting to get this to work without copying my menu block to scrap book, because if / when it changes, I have to redo the block on each page, every time.
Thanks again!
Definitely different that my previous trial and error attempts, but still a no go.
I'm beginning to think this won't work, and hoping there is a way to make a navigational menu span between all pages so editing the menu on each page is not necessary.
Any other ideas?
And thanks Mnkras.
I'm beginning to think this won't work, and hoping there is a way to make a navigational menu span between all pages so editing the menu on each page is not necessary.
Any other ideas?
And thanks Mnkras.
what are you trying to do?
I want to put a custom css navigation menu onto each page, and edit it from one location and the changes span across all pages that menu is on.
Normally, I would make a menu.php page, and call it using <?php include tag on each page in the div it should be located in. And when I needed to add a link or remove a link, I'd edit menu.php and it would make the changes across the board.
I want to be able to do that, with a block in C5.
I hope that makes sense.
And again, thanks!
Normally, I would make a menu.php page, and call it using <?php include tag on each page in the div it should be located in. And when I needed to add a link or remove a link, I'd edit menu.php and it would make the changes across the board.
I want to be able to do that, with a block in C5.
I hope that makes sense.
And again, thanks!
is it a navigation of pages in concrete5? or other things?
Navigation of pages in C5.
I just read that using the global scrapbook should do what I am wanting to do, but when I make changes to a block in my global scrapbook in the dashboard, it does not register the change across the pages.
I just read that using the global scrapbook should do what I am wanting to do, but when I make changes to a block in my global scrapbook in the dashboard, it does not register the change across the pages.
show me example html markup of what you want it to look like
<ul id="menu"> <li><a href="index.php" class="home">Home</a></li> <li><a href="index.php?cID=84" class="about">About Us</a></li> <li><a href="index.php?cID=81" class="books">Our Books</a></li> <li><a href="index.php/blog" class="blog">Our Blog</a></li> <li><a href="index.php?cID=83" class="contact">Contact Us</a></li> </ul>
And of course the CSS is in the main.css file in the template folder.
well, your going to have to make some minor css changes,
http://pastie.org/1706552
add that in /blocks/autonav/ and make a file called view.php
if you view the source of the page after doing that, you should see something like p23 as the class (the number will be different for each page) so just change the css class in your css files to match.
Hope this is what you needed.
Mike
http://pastie.org/1706552
add that in /blocks/autonav/ and make a file called view.php
if you view the source of the page after doing that, you should see something like p23 as the class (the number will be different for each page) so just change the css class in your css files to match.
Hope this is what you needed.
Mike
Thank you. Figured it out and works like a charm!
FWIW
The php block is THE most useful block IMHO. Just create what you need and add to the scrap book and you don't need to worry about all the views, controllers etc.
The php block is THE most useful block IMHO. Just create what you need and add to the scrap book and you don't need to worry about all the views, controllers etc.
like that?