... | in move_node.naml |
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
<macro name="save_parent_changes">
<n.catch_exception. id="save-block">
<n.edit_page_node.>
<!-- If the URL is empty, we use the current app -->
<n.if.is_empty.trim.parent_url_field.value>
<then.parent_url_field.set_value value="[n.page_node.get_app_node.url/]"/>
</n.if.is_empty.trim.parent_url_field.value>
<!-- If same site, just move. Otherwise, export it. -->
<n.if.url_belongs_to_site url="[n.parent_url_field.value/]">
<then>
<n.set_parent_url parent_url="[n.parent_url_field.value/]" />
<n.save_node/>
</then>
<else>
<n.if.is_valid_export_permalink permalink="[n.parent_url_field.value/]">
<then>
<!-- Hardcoded link until ExportConfirmation is templated -->
<n.set_var. name='url'>/catalog/ExportConfirmation.jtp?node=<n.page_node.id/>&url=<n.parent_url_field.value/></n.set_var.>
<n.redirect_to.var name='url'/>
</then>
<else>
<n.throw_template_exception name="invalid_permalink"/>
</else>
</n.if.is_valid_export_permalink>
</else>
</n.if.url_belongs_to_site>
</n.edit_page_node.>
<n.redirect_to.page_node.path/>
</n.catch_exception.>
</macro>
|
Free forum by Nabble | Edit this page |