BoldMinded acquires Ansel, support ending for all add-ons. BoldMinded acquires Ansel, support ending for all add-ons. Read More →
Support has been discontinued. Issues remain available as an archive. Support has been discontinued. Issues remain available as an archive.
External URLs resolving to local system
#89 opened by JimInHolland
Description
Using the Pages module and Routing on Construct turned off.
For example, let's say I'm on my site, http://www.currentsite.com (all sites renamed to protect the innocent) and I want to use the External Link to redirect out to Apple's site in the Menu:
Adding an external URL, filling in Name (Apple.com) and External Link (https://www.apple.com) renders
Replies
- JimInHolland
Replied 3/5/2018 10:42 AM, Edited 3/6/2018 5:19 PM
<!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> {exp:construct:nodes tree_id="2"} {if construct:node_level == 1} {if construct:level_count == 1} <ul class="nav navbar-nav navbar-right"> {/if} <li> <a href="/{construct:node_full_route}" target="view">{construct:node_name}</a> {if construct:has_children} </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> <ul class="dropdown-menu"> {construct:children} </ul> </li> {/if} </li> {if construct:level_count == construct:level_total_results} </ul> {/if} {if:elseif construct:node_level == 2} <li><a href="/{construct:node_full_route}" target="view">{construct:node_name}</a></li> {/if} {/exp:construct:nodes} </div><!-- /.navbar-collapse -->
- JimInHolland
Replied 3/5/2018 10:43 AM, Edited 3/6/2018 5:19 PM
This code is used in a Bootstrap menu bar.
- TJ Draper
Replied 3/6/2018 5:15 PM, Edited 3/6/2018 5:19 PM
Can you provide a code sample for you construct tag output?
- TJ Draper
Replied 3/6/2018 5:19 PM
I don't see the
{construct:node_link}
or{construct:node_external_link}
variable in the code sample anywhere.{construct:node_link}
will be thenode_full_route
unless the External Link field has content, in which case it will be the external link.{construct:node_external_link}
is always the link field.