Creating additional pages from existing HTML

Permalink
I've created my default.php (www.petiquette.co.nz) but I can't figure out how im supposed to create additional pages using the links that I already have in my HTML docs.


This is the code that I currently have in my default.php.

<div id="menu">
<a href="<?=$this->getThemePath()?>/">Home</a>
<a href="<?=$this->getThemePath()?>/about.php">About Us</a>
<a href="<?=$this->getThemePath()?>/consultations.php">1-2-1 Consultations</a>
<a href="<?=$this->getThemePath()?>/puppyclasses.php">Puppy Classes</a>
<a href="<?=$this->getThemePath()?>/contact.php">Contact Us</a>
</div>


But how do I create new pages and have it link up to About Us, 1-2-1 Consultations, Puppy Classes and Contact Us and keep the format that I currently have?

 
jacje626 replied on at Permalink Reply
if i am trying to create an 'about us' page, do i create a new about.php with all the necessary HTML and have that sitting in the /themes folder?
RafaelGP replied on at Permalink Reply
RafaelGP
Hi there!

Do you have a working default.php file?

If you have it, the easiest thing to do is to adding a page called 'about'.

Then add 'Blocks' to your 'Areas', in order to migrate your HTML content to Concrete5.

So for example:
1. Enter in 'Edit mode'
2. Click on 'Add to Main' (that's the Main area) and 'Add Block'
3. Choose 'Content' (the one at the top)
4. Copy and paste your content there.

Keep on adding Blocks and adding content until you are done.

The 'Content Block' has also a 'Edit in HTML' mode (HTML button in the tools bar) which you might find handy to add classes, etc...

I hope it helped.

Cheers
jacje626 replied on at Permalink Reply
so i wont have documents called about.php/consultations.php or anything?

how do i get the links on the top navigation to redirect to the URL of the new pages that i create?
RafaelGP replied on at Permalink Best Answer Reply
RafaelGP
Hi there!

Webpages like about.php will be there, but there isn't an actual php file called about.php.

So creating a link like

<a href="/abut.php">About us</a>


will open the (automatically generated by Concrete5) page.

Concrete5 has a block to generate a navigation bar which displays automatically pages and sub-pages. It's called Auto-Nav. It takes a little while to get it working exactly as one want (appearance and functionality) but in my opinion it is a must have in a Concrete5 website.

1. You need to add this code to your template, wherever you would like to display the navigation bar.

<?php $navigation = new Area('Header Nav'); $navigation->display($c); ?>


This adds a new Area called Header Nav.

2. Then go to a page which uses this template and enter in edit mode.
3. Click in the Area called 'Header Nav' and then 'Add'.
4. Choose the 'Auto-Nav' Block from the list
5. Then you need to play with the options to display the pages you really want to show. I can't explain you all the options now, so please check the documentation for this block.

You will probably need to tweak it's appearance. To do this follow this steps:

1. In your server go to Concrete/Blocks/autonav and COPY the view.php file into the folder located in Blocks/autonav/templates. If there is no templates folder ylease create one.
2. Rename that view.php file as myautonav.php
3. You can proceed to edit that file, change things, add classes, etc...
4. Finally go to the page where you added the Auto-Nav Block and enter in Edit mode.
5. Click on the Auto-Nav Block and select Custom Templates
6. Choose myautonav from the drop down menu and then Update

That's it. Now you have your custom navigation bar set up.

Hope it helped!

Cheers